[issue31517] MainThread association logic is fragile

Nick Coghlan report at bugs.python.org
Wed Sep 20 04:47:19 EDT 2017


Nick Coghlan added the comment:

We had the quirks of import related threading deadlocks documented for a long time, not as a promise, but as a debugging aid (and a recommendation for "don't do that").

I'd see this as being similar: we'd document that if you're using the _thread module, or otherwise allowing operating system threads not managed by the threading module to call in and run arbitrary Python code, then you should run "import threading" early in the actual main thread to make sure it gets associated correctly.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31517>
_______________________________________


More information about the Python-bugs-list mailing list