Author pitrou
Recipients bquinlan, dmalcolm, jnoller, kristjan.jonsson, lukasz.langa, neologix, pitrou, sandro.tosi, ysj.ray
Date 2011-04-25.21:39:31
SpamBayes Score 1.07329e-07
Marked as misclassified No
Message-id <1303767573.16.0.846282359543.issue10517@psf.upfronthosting.co.za>
In-reply-to
Content
> I think that if we were to call PyThread_set_key_value twice on the
> same key it's either an error, or we want the last version to be
> stored, not the old one.

Not necessarily. You can have several interpreters (and therefore several thread states) in a single thread, using Py_NewInterpreter(). It's used by mod_wsgi and probably other software. If you overwrite the old value with the new one, it may break such software.

Would it be possible to cleanup the autoTLS mappings in PyOS_AfterFork() instead?
History
Date User Action Args
2011-04-25 21:39:33pitrousetrecipients: + pitrou, bquinlan, kristjan.jonsson, jnoller, dmalcolm, sandro.tosi, ysj.ray, neologix, lukasz.langa
2011-04-25 21:39:33pitrousetmessageid: <1303767573.16.0.846282359543.issue10517@psf.upfronthosting.co.za>
2011-04-25 21:39:32pitroulinkissue10517 messages
2011-04-25 21:39:31pitroucreate