emscripten-core/emscripten

Make use of Asyncify for pthread_join

Open

#9910 aperta il 27 nov 2019

Vedi su GitHub
 (25 commenti) (1 reazione) (0 assegnatari)C++ (3519 fork)batch import
asyncifygood first bughelp wantedmultithreading

Metriche repository

Star
 (27.361 star)
Metriche merge PR
 (Merge medio 19g 10h) (147 PR mergiate in 30 g)

Descrizione

[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.

Guida contributor