Files
cpython/Lib/test
Miss Islington (bot) 1bd2c93474 [3.12] gh-102512: Turn _DummyThread into _MainThread after os.fork() called from a foreign thread (GH-113261) (GH-114430)
Always set a _MainThread as a main thread after os.fork() is called from
a thread started not by the threading module.

A new _MainThread was already set as a new main thread after fork if
threading.current_thread() was not called for a foreign thread before fork.
Now, if it was called before fork, the implicitly created _DummyThread will
be turned into _MainThread after fork.

It fixes, in particularly, an incompatibility of _DummyThread with
the threading shutdown logic which relies on the main thread
having tstate_lock.

(cherry picked from commit 49785b06de)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
2024-01-22 15:24:43 +00:00
..
2022-04-07 12:27:35 -07:00
2022-04-07 12:27:35 -07:00
2022-08-04 18:12:35 +02:00
2022-08-04 18:12:35 +02:00
2022-04-23 14:48:17 -07:00
2022-10-03 17:12:36 -07:00