0

I would like to use thread local storage across multiple classes.

But threading.local() gets me a new instance of storage every time I call it. Is there a way to use

threading.local().__setattr__('r_id', uuid.uuid4())

And there an equivalent of somehow to access in a completely different class ?

threading.local().__getattribute__('r_id')
Roman
  • 7,933
  • 17
  • 56
  • 72
  • Here you can find your ans [http://stackoverflow.com/questions/104983/what-is-thread-local-storage-in-python-and-why-do-i-need-it][1] [1]: http://stackoverflow.com/questions/104983/what-is-thread-local-storage-in-python-and-why-do-i-need-it – Jatin Malwal Mar 05 '14 at 10:27

1 Answers1

0

Here you can find your ans

https://stackoverflow.com/questions/104983/what-is-thread-local-storage-in-python-and-why-do-i-need-it

Here you can find something interesting as well

Efficient way to determine whether a particular function is on the stack in Python

Community
  • 1
  • 1
Jatin Malwal
  • 5,133
  • 2
  • 23
  • 26