Message298654
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. |
|
Date |
User |
Action |
Args |
2017-07-19 09:54:03 | vstinner | set | recipients:
+ vstinner, Thomas Mortensson |
2017-07-19 09:54:03 | vstinner | set | messageid: <1500458043.19.0.173196863594.issue30967@psf.upfronthosting.co.za> |
2017-07-19 09:54:03 | vstinner | link | issue30967 messages |
2017-07-19 09:54:02 | vstinner | create | |
|