Message380875
The current documentation of `thread.local` is
----
Thread-Local Data
Thread-local data is data whose values are thread specific. To manage thread-local data, just create an instance of local (or a subclass) and store attributes on it:
mydata = threading.local()
mydata.x = 1
The instance’s values will be different for separate threads.
class threading.local
A class that represents thread-local data.
For more details and extensive examples, see the documentation string of the _threading_local module.
----
There is no link to the `_threading_local` module docs in the documentation and none of the content from the modules docstrings appear anywhere on docs.python.org website. This is rather annoying because the docstring contains completely non-trivial information including that threading.local can be subclassed and that the __init__ will be run once for each thread for each instance where attributes are accessed. |
|
Date |
User |
Action |
Args |
2020-11-13 11:17:53 | ztane | set | recipients:
+ ztane, docs@python |
2020-11-13 11:17:53 | ztane | set | messageid: <1605266273.51.0.273989729799.issue42343@roundup.psfhosted.org> |
2020-11-13 11:17:53 | ztane | link | issue42343 messages |
2020-11-13 11:17:52 | ztane | create | |
|