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

Missing docs on atomic nature of wait / notify

Aperta
#211 1 commento 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
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
wasm

Direzione di ricerca

Inizia esaminando la formulazione della specifica relativa a wait e notify e confrontala con la documentazione futex collegata. Individua dove sono definiti il linguaggio attuale relativo all’ordinamento sequenziale e quello relativo ai caricamenti atomici, quindi chiarisci la relazione atomica richiesta tra caricamento, confronto, blocco e operazioni concorrenti. Il lavoro è completato quando la specifica documenta esplicitamente l’atomicità prevista.

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

Descrizione

wait and notify are probably inspired by futex APIs. However, currently they seem to be underspecified in terms of atomicity. When referring to futex docs

https://man7.org/linux/man-pages/man2/futex.2.html

       loading of the futex word's value, the comparison of that value
       with the expected value, and the actual blocking will happen
       atomically and will be totally ordered with respect to concurrent
       operations performed by other threads on the same futex word.
       Thus, the futex word is used to connect the synchronization in
       user space with the implementation of blocking by the kernel.

In other words, there should be no concurrent wait/notify operations for a given address.

Here, there is no such language, only sequential ordering and "Otherwise, the wait operation begins by performing an atomic load from the given address. If the loaded value is not equal to the expected value, the operator returns 1 ("not-equal"). If the values are equal, the agent is suspended. ", this latter note not mentioning that this all has to be atomic vs other operations on the given address. An implementation (like my first prototype :P) may not preserve this atomicity if only implementing based on the wording.

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 Operating Systems

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.