[3.8] bpo-40089: Fix threading._after_fork() (GH-19191) by miss-islington · Pull Request #19194 · python/cpython
If fork was not called by a thread spawned by threading.Thread,
threading._after_fork() now creates a _MainThread instance for
_main_thread, instead of a _DummyThread instance.
(cherry picked from commit d8ff44c)
Co-authored-by: Victor Stinner vstinner@python.org