[issue6627] threading.local() does not work with C-created threads

Nikolaus Rath report at bugs.python.org
Fri Sep 17 23:16:10 CEST 2010


Nikolaus Rath <Nikolaus at rath.org> added the comment:

To be a bit more constructive, why not add something like this in paragraph to http://docs.python.org/library/ctypes.html#callback-functions:

"Note that if the callback function is called in a new thread that has been created outside of Python's control (i.e., by the foreign code that calls the callback), ctypes creates a new dummy Python thread on every invocation. That means that values stored with `threading.local` will *not* survive across different callbacks.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6627>
_______________________________________


More information about the Python-bugs-list mailing list