emscripten-core/emscripten

Make use of Asyncify for pthread_join

Open

#9.910 geöffnet am 27. Nov. 2019

Auf GitHub ansehen
 (25 Kommentare) (1 Reaktion) (0 zugewiesene Personen)C++ (3.519 Forks)batch import
asyncifygood first bughelp wantedmultithreading

Repository-Metriken

Stars
 (27.361 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 19T 10h) (147 gemergte PRs in 30 T)

Beschreibung

[Forked from discussion in #9579]

Rather than disallowing blocking on the main thread and giving an escape hatch in form of a setting that still allows it, we could transform pthread_join and friends via Asyncify instead and use Atomics.waitAsync under the hood.

This way the main browser thread wouldn't really be blocked, but the code would be still backwards-compatible and properly wait for thread to finish execution as user expects.

Contributor Guide