WebAssembly / WebAssembly/threads

Naming convention for wait/notify instructions

Open
#145 4 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

The threads proposal as is is limited to shared memories, but we probably want to generalise the language to other shared entities eventually, e.g., globals or tables. At that point, it might be conceivable that we may want to introduce not just atomic get/set for those, but also wait/notify instructions.

However, the current naming scheme for wait/notify instructions does not make explicit that they are operating on a memory. In the interest of forward compatibility, should we fix that? It might also be nice for improved consistency with other memory instructions.

Bikeshedding possibilities:

  • memory.atomic.notify, i32.memory.atomic.wait
  • memory.atomic.notify, memory.i32.atomic.wait
  • memory.atomic.notify, memory.atomic.wait32

Admittedly, neither pair is particularly pretty. Thoughts?

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 threads proposal context and the existing wait/notify instruction naming. Compare the naming alternatives listed in this issue with the conventions for other memory instructions. Done means the proposal has a decided, forward-compatible naming scheme rather than an unresolved set of options.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.