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 pitrou
Recipients bquinlan, dmalcolm, jnoller, kristjan.jonsson, lukasz.langa, neologix, pitrou, sandro.tosi, ysj.ray
Date 2011-04-26.15:18:06
SpamBayes Score 1.7236309e-06
Marked as misclassified No
Message-id <1303831074.3518.15.camel@localhost.localdomain>
In-reply-to <BANLkTimiTTG+41f8tHuMsGyvY5uLRp13pA@mail.gmail.com>
Content
> Well, after fork, all threads have exited, so you'll be running on the
> behalf of the child process' main - and only - thread, so by
> definition you can't access other threads' thread-specific data, no?

A rather good point :)
How about deleting the mapping (pthread_key_delete) and recreating it
from scratch, then?

> As an alternate solution, I was thinking of calling
> PyThread_delete_key_value(autoTLSkey) in the path of thread bootstrap,
> i.e. starting in Modules/_threadmodule.c t_bootstrap.

That would somewhat alleviate the problem, but only for Python-created
threads. Threads created through other means (for example mod_wsgi, or
database wrappers having their own thread pools) would still face the
original issue.
History
Date User Action Args
2011-04-26 15:18:07pitrousetrecipients: + pitrou, bquinlan, kristjan.jonsson, jnoller, dmalcolm, sandro.tosi, ysj.ray, neologix, lukasz.langa
2011-04-26 15:18:06pitroulinkissue10517 messages
2011-04-26 15:18:06pitroucreate