Message134471
> 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. |
|
Date |
User |
Action |
Args |
2011-04-26 15:18:07 | pitrou | set | recipients:
+ pitrou, bquinlan, kristjan.jonsson, jnoller, dmalcolm, sandro.tosi, ysj.ray, neologix, lukasz.langa |
2011-04-26 15:18:06 | pitrou | link | issue10517 messages |
2011-04-26 15:18:06 | pitrou | create | |
|