Enable emscripten_futex API for Wasm Workers#26325
Enable emscripten_futex API for Wasm Workers#26325sbc100 merged 1 commit intoemscripten-core:mainfrom
Conversation
73a4b15 to
3cbc701
Compare
3cbc701 to
dae5acb
Compare
|
Can you also take a look at #26309 which this change depends on ? |
dae5acb to
8351a68
Compare
Maybe a better approach would be to implement |
I think they overhead is more about being able to run on the main thread.
So at the very least we need to have |
8351a68 to
326873c
Compare
This involves also including `emscripten_thread_state.S` which provides APIs such as `emscripten_is_main_runtime_thread` and emscripten_is_main_browser_thread` which now also work in Wasm Workers. There is a minor code size hit here of ~80 bytes, but I think its worth it to have these low level APIs available everywhere.
326873c to
b2e07e5
Compare
|
OK, I jumped through some hoops to ensure that the cost of tracking the tread state is only payed for programs that use these APIs. |
This involves also including
emscripten_thread_state.Swhich providesAPIs such as
emscripten_is_main_runtime_threadandemscripten_is_main_browser_thread` which now also work in Wasm Workers.
There is a minor code size hit here of ~80 bytes, but I think its
worth it to have these low level APIs available everywhere.
Depends on: #26309
Fixes: #26314