Message241752
Think of threading.local this way: instances of threading.local are shared between all the threads, but the effective "__dict__" of each instance is per-thread. Basically, the object stores a dict for each thread. In __getattribute__, __setattr__, and __delattr__ it swaps the dict for the current thread into place and then does proceeds normally. |
|
Date |
User |
Action |
Args |
2015-04-21 22:34:42 | eric.snow | set | recipients:
+ eric.snow, rhettinger, paul.moore, docs@python, ethan.furman, eryksun |
2015-04-21 22:34:42 | eric.snow | set | messageid: <1429655682.28.0.603601265872.issue24020@psf.upfronthosting.co.za> |
2015-04-21 22:34:42 | eric.snow | link | issue24020 messages |
2015-04-21 22:34:42 | eric.snow | create | |
|