# Issue with Using pthread in WASM

**URL:** https://discourse.vtk.org/t/issue-with-using-pthread-in-wasm/15767
**Category:** vtk.wasm
**Created:** [June 27, 2025, 1:34pm UTC](https://discourse.vtk.org/t/issue-with-using-pthread-in-wasm/15767 "2025-06-27T13:34:18Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![blocky](https://discourse.vtk.org/user_avatar/discourse.vtk.org/blocky/32/9531_2.png) [@blocky](https://discourse.vtk.org/u/blocky)
#### Post date: [June 30, 2025, 12:00pm UTC](https://discourse.vtk.org/t/issue-with-using-pthread-in-wasm/15767/3 "2025-06-30T12:00:19Z")

</div>

Thank you for your reply! I was previously using MinGW, but after switching to Ninja, the issue was resolved.

Now I have another question related to WebGPU. I’d like to use both multithreading and WebGPU together. Following the discussion here: [Problems when compilate VTK build for wasm - #4 by jaswantp](https://discourse.vtk.org/t/problems-when-compilate-vtk-build-for-wasm/15648/4), I integrated Demdawnwebgpu\_DIR into my build, and then encountered the same error as before, which I suspect is due to the WebGPU build not being compiled with the -pthread flag.

> –shared-memory is disallowed by webgpu.cpp.o because it was not compiled with ‘atomics’ or ‘bulk-memory’ features.

Is there a version of the webgpu that supports multithreading? Or is there any source code and guidance on how to build webgpu properly with multithreading support?

Thanks again for your help!

---

_[View the full topic](https://discourse.vtk.org/t/issue-with-using-pthread-in-wasm/15767)._
