Skip to content
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

Fix Wasm Workers calling emscripten_futex_wait() when building with pthreads support enabled. Fixes #21549. #21618

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

juj
Copy link
Collaborator

@juj juj commented Mar 26, 2024

Would benefit from a test, I'll look into this shortly.

@@ -98,8 +99,8 @@ addToLibrary({
// Run the C side Worker initialization for stack and TLS.
_emscripten_wasm_worker_initialize(m['sb'], m['sz']);
#if PTHREADS
// Record that this Wasm Worker supports synchronous blocking in emscripten_futex_wake().
___set_thread_state(/*thread_ptr=*/0, /*is_main_thread=*/0, /*is_runtime_thread=*/0, /*supports_wait=*/0);
// Record that this Wasm Worker supports synchronous blocking in emscripten_futex_wait().
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just remove this comment line. The name workerSupportsFutexWait is self explanitiory and the comment is not accurate since this Wasm Worker doesn't always support blocking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants