emscripten-core / emscripten-core/emscripten

Make use of Asyncify for pthread_join

Open
#9,910 25 comments 1 reaction 0 assignees View on GitHub
asyncify good first bug help wanted multithreading
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.