emscripten-core/emscripten

Make use of Asyncify for pthread_join

Open

#9.910 aberto em 27 de nov. de 2019

Ver no GitHub
 (25 comments) (1 reaction) (0 assignees)C++ (3.519 forks)batch import
asyncifygood first bughelp wantedmultithreading

Métricas do repositório

Stars
 (27.361 stars)
Métricas de merge de PR
 (Mesclagem média 19d 10h) (147 fundiu PRs em 30d)

Description

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

Guia do colaborador