This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Thomas Mortensson, vstinner
Date 2017-07-19.09:54:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1500458043.19.0.173196863594.issue30967@psf.upfronthosting.co.za>
In-reply-to
Content
Python 2.7 uses its own implementation of Thread Local Storage: see find_key() in Python/thread.c. This implementation uses a lock and a chained list. A fork only clones the current thread in the child process, all other threads are "removed", so Python has to manually remove all TLS variables of the other threads using PyThread_ReInitTLS().

I don't think that Python 3 is affected by such bug, since Python 3 uses native TLS APIs like pthread pthread_{get,set}specific() on UNIX/BSD.
History
Date User Action Args
2017-07-19 09:54:03vstinnersetrecipients: + vstinner, Thomas Mortensson
2017-07-19 09:54:03vstinnersetmessageid: <1500458043.19.0.173196863594.issue30967@psf.upfronthosting.co.za>
2017-07-19 09:54:03vstinnerlinkissue30967 messages
2017-07-19 09:54:02vstinnercreate