Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

memory.atomic.wait32 on the main browser thread

Aperta
#174 17 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
wasm
Ambito
web-dev

Direzione di ricerca

Inizia con la sezione collegata della specifica dei thread WebAssembly e con l’esempio WAST fornito, quindi riproduci memory.atomic.wait32 nel thread principale del browser in Firefox e Chrome. Confronta entrambi i risultati con la specifica e documenta quale comportamento è richiesto oppure se la specifica necessita di un chiarimento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Writing some unit tests for Emscripten, I today realize that Firefox and Chrome behavior differ when one issues a memory.atomic.wait32 on the main thread.

If one issues e.g.

  (drop
   (memory.atomic.wait32 offset=12
    (local.get $0)
    (i32.const 0)
    (i64.const 135790)
   )
  )

on the main thread,

  • Firefox will raise an exception "TypeError: waiting is not allowed on this thread"
  • Chrome will immediately and silently return without performing the wait

Tried to search through the spec to find the reference for wait instruction at https://webassembly.github.io/threads/core/syntax/instructions.html#syntax-instr-atomic-memory , but was unable to figure out which is the correct behavior, or if both are?

(I am aware of Atomics.waitAsync, this question is not about that, but just about what should happen if one does attempt a memory.atomic.wait32 on the main thread)

Lingua principale
WebAssembly
Stelle
767
Fork
54
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WebAssembly/threads

Tutte le issue di WebAssembly/threads

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.