emscripten-core / emscripten-core/emscripten
node worker_threads in electron app fails, causing pthread usage to fail
Open
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Emscripten attempts to use node's worker_threads module in an electron app BrowserWindow (`nodeIntegration: true`), which will successfully `require('worker_threads')` but attempting to contstruct a `Worker` will fail with "worker threads are not supported in this node environment".
Emscripten should either detect the electron environment and use Web workers, or prefer Web Workers in all cases.
Contributor guide
Assessment
This issue has not been assessed yet.