mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
GH-110829: Ensure Thread.join() joins the OS thread (#110848)
Joining a thread now ensures the underlying OS thread has exited. This is required for safer fork() in multi-threaded processes. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
parent
a28a3967ab
commit
0e9c364f4a
14 changed files with 676 additions and 103 deletions
|
|
@ -94,6 +94,15 @@ pthread_detach(pthread_t thread)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
pthread_join(pthread_t thread, void** value_ptr)
|
||||
{
|
||||
if (value_ptr) {
|
||||
*value_ptr = NULL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyAPI_FUNC(pthread_t) pthread_self(void)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue