emscripten-core/emscripten

Make use of Asyncify for pthread_join

開放

#9,910 建立於 2019年11月27日

 (25 則留言) (1 個反應) (0 位負責人)C++ (3,519 個分叉)batch import
asyncifygood first bughelp wantedmultithreading

倉庫指標

星標
 (27,361 顆星)
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.

貢獻者指南