[issue26624] Windows hangs in call to CRT setlocale()
Jeremy Kloth
report at bugs.python.org
Wed Mar 23 12:57:20 EDT 2016
Jeremy Kloth added the comment:
>From the UCRT sources:
// Deadlock Avoidance: When a new thread is created in the process, we
// create a new PTD for the thread. The PTD initialization function is
// called under the loader lock. This initialization function will also
// acquire the locale lock in order to acquire a reference to the current
// global locale for the new thread.
//
// Some of the locale APIs are not available on all supported target OSes.
// We dynamically obtain these libraries via LoadLibrary/GetProcAddress.
// We must ensure that no call to LoadLibrary is made while we hold the
// locale lock, lest we deadlock due to lock order inversion between the
// loader lock and the locale lock.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26624>
_______________________________________
More information about the Python-bugs-list
mailing list