[Python-ideas] Allow getting all the items out of a `threading.local`

Antoine Pitrou antoine at python.org
Fri Aug 22 16:38:58 CEST 2014


Le 22/08/2014 07:40, Ram Rachum a écrit :
> I propose adding a method to `threading.local` that allows to check the
> values stored for any and all threads.
>
> I asked on Stack Overflow how to do
> that: http://stackoverflow.com/questions/25435908/python-getting-all-the-items-out-of-a-threading-local
>
> But I got the answer that it's only possible on the pure Python
> implementation, not the C one. And it's quite ugly too.
>
> I propose a method be added to both the Python implementation and the C
> implementation of `threading.local` that allows checking the values
> stored for all threads.

Do other languages have such a functionality?
As for feasibility, the best way to check is to try to write a patch :-)

Regards

Antoine.




More information about the Python-ideas mailing list