WebAssembly / WebAssembly/threads

Underspecification of disallowing waits on the main thread

Open Beginner friendly
#254 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
767
Forks
54
PR merge metrics
No merged PRs in 30d

Description

I could not find anywhere in the core spec or JS API spec that says that waiting on the main browser thread traps. Even the overview does not directly address this except for a code comment in an example saying, Blocking on the main thread is not allowed, so we can't call lockMutex.

For consistency with Atomics.wait in JS, the expected behavior is that executing the wait always traps on the main thread, whether or not the thread would actually have been suspended.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the core spec and JS API spec sections covering waits, then compare their wording with the overview and the example comment about blocking on the main thread. Document that executing a wait on the main browser thread always traps, consistently with JavaScript Atomics.wait, whether or not suspension would occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.