Should thread creation be fallible?

Offen
#758 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 4 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
wasm

Rechercherichtung

Read the issue’s proposal about thread.new-indirect and its comparison with pthread_create; the payload does not name a specification file, test, or implementation entry point. Decide whether thread creation failure should be reported to the guest, and define the failure result and its behavior before this can be considered done.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Right now thread.new-indirect unconditionally returns a new thread, meaning that if a host doesn't actually have the resources to allocate a thread then the only thing it can do is trap. APIs like pthread_create can communicate thread creation failure, however, and in theory a -1 sentinel or similar here should be possible, so I wanted to ask the question -- should thread.new-indirect grow the ability to inform the guest in a non-fatal way that thread creation failed? Perhaps by returning -1?

Vorherrschende Sprache
WebAssembly
Sterne
1.4k
Forks
132
Ø Merge
5 T. 10 Std.
Gemergte PRs (30 T.)
10

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus WebAssembly/component-model

Alle Issues in WebAssembly/component-model

Ähnliche Issues

Weitere Issues zu Distributed Systems

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.