Message134418
> 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? |
|
Date |
User |
Action |
Args |
2011-04-25 21:39:33 | pitrou | set | recipients:
+ pitrou, bquinlan, kristjan.jonsson, jnoller, dmalcolm, sandro.tosi, ysj.ray, neologix, lukasz.langa |
2011-04-25 21:39:33 | pitrou | set | messageid: <1303767573.16.0.846282359543.issue10517@psf.upfronthosting.co.za> |
2011-04-25 21:39:32 | pitrou | link | issue10517 messages |
2011-04-25 21:39:31 | pitrou | create | |
|