emscripten-core / emscripten-core/emscripten

Support the building of an executable which has optional multithreading if `SharedArrayBuffer` is available

Open
#20,572 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

For [`magickwand.js`](https://magickwand.js.org/) I would like to be able to ship an universal binary that uses multithreading and has `xxxAsync` methods available when `SharedArrayBuffer` is available but which can be loaded without `SharedArrayBuffer` - async methods will throw in this case.

This will leave the user the option to implement multithreading himself - by creating web workers and passing messages - eventually using a framework such as [`comlink`](https://www.npmjs.com/package/comlink).

As this will require significant changes, I would like to discuss it before starting the implementation.

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.