gh-101538: Add experimental wasi-threads build (#101537)

Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
YAMAMOTO Takashi 2023-06-23 03:26:10 +09:00 committed by GitHub
parent 13237a2da8
commit d8f87cdf94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 3 deletions

View file

@ -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