emscripten-core/emscripten

Make use of Asyncify for pthread_join

Open

#9,910 创建于 2019年11月27日

在 GitHub 查看
 (25 评论) (1 反应) (0 负责人)C++ (3,519 fork)batch import
asyncifygood first bughelp wantedmultithreading

仓库指标

Star
 (27,361 star)
PR 合并指标
 (平均合并 19天 10小时) (30 天内合并 147 个 PR)

描述

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

贡献者指南