-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update documentation on Wasm Workers #21686
base: main
Are you sure you want to change the base?
Conversation
So the pre-allocated stack is for thread-local storage? @juj |
If the normal worker api can be spawned using a custom URL, how do we postmessage wasm function calls over? How does the worker api function? |
…Emscripten Workers API. Addresses emscripten-core#21610.
Sorry for the delay, I was on a leave for a while there. Updated to address the review.
With Wasm Workers, the stack memory area that is passed to Wasm Worker creation will contain the stack, but additionally, the TLS memory for the Wasm Worker will be located at the bottom end of that memory area. This simplifies the Wasm Worker memory initialization, as it allows one to allocate only one memory block for all dynamic memory needs for the Wasm Worker.
The earlier Worker API uses these functions to postMessage() there and back: emscripten/system/include/emscripten/emscripten.h Lines 126 to 138 in 58d39a5
|
658392e
to
f926a27
Compare
Update documentation on Wasm Workers stack size, and Wasm Workers vs Emscripten Workers API. Addresses #21610.