mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
[3.12] gh-101538: Add experimental wasi-threads build (GH-101537) (#106834)
(cherry picked from commit d8f87cdf94
)
Co-authored-by: YAMAMOTO Takashi <yamamoto@midokura.com>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
941ac1e19d
commit
e903c16a6c
5 changed files with 53 additions and 3 deletions
|
@ -356,7 +356,15 @@ PyThread_exit_thread(void)
|
|||
{
|
||||
if (!initialized)
|
||||
exit(0);
|
||||
#if defined(__wasi__)
|
||||
/*
|
||||
* wasi-threads doesn't have pthread_exit right now
|
||||
* cf. https://github.com/WebAssembly/wasi-threads/issues/7
|
||||
*/
|
||||
abort();
|
||||
#else
|
||||
pthread_exit(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_SEMAPHORES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue