emscripten-core / emscripten-core/emscripten

node worker_threads in electron app fails, causing pthread usage to fail

Open
#20,744 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.