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 amaury.forgeotdarc
Recipients amaury.forgeotdarc, anacrolix, ncoghlan, nikratio, swapnil, verigak
Date 2010-09-17.15:28:45
SpamBayes Score 7.797023e-06
Marked as misclassified No
Message-id <1284737328.05.0.64793036339.issue6627@psf.upfronthosting.co.za>
In-reply-to
Content
One more thing:
in the sample code, the thread initializes no PyThreadState. So the ctypes callback creates a temporary PyThreadState just for the duration of the call.

This explains the difference between threading.local and _threading_local:

- threading.local() uses the PyThreadState to store its data: You get a new value on each call.
- _threading_local.local() uses a global dictionary indexed by the thread id: the same value is retained across call.
History
Date User Action Args
2010-09-17 15:28:48amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, ncoghlan, nikratio, verigak, swapnil, anacrolix
2010-09-17 15:28:48amaury.forgeotdarcsetmessageid: <1284737328.05.0.64793036339.issue6627@psf.upfronthosting.co.za>
2010-09-17 15:28:45amaury.forgeotdarclinkissue6627 messages
2010-09-17 15:28:45amaury.forgeotdarccreate