Per thread data

Gerhard Häring gh at ghaering.de
Mon Jul 9 09:11:56 EDT 2007


Will McGugan wrote:
> Hi,
> 
> Is there a canonical way of storing per-thread data in Python?

Good question.

There's threading.local() which creates a thread-local object for you.

Maybe this Cookbook entry is helpful:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/302088

-- Gerhard



More information about the Python-list mailing list