Understanding PyEval_InitThreads

Martin v. Loewis martin at v.loewis.de
Wed Nov 20 14:58:30 EST 2002


Thomas Heller <theller at python.net> writes:

> Storing the thread state in a global variable would be possible, but
> in this case it wouldn't be thread safe, I assume, and *only* work if
> the callout into C is done by my extension module.

On platforms supporting it, you could also save it in a thread-local
variable.

Regards,
Martin




More information about the Python-list mailing list