Local
This class provides a mechanism for managing thread-local or context-local data by mapping attributes to unique identifiers. It allows for the creation of proxies to specific attributes and supports the manual release of local storage for the current context. The implementation uses a custom storage dictionary to isolate data based on the identity of the calling thread or greenlet.
Attributes
| Attribute | Type | Description |
|---|---|---|
| storage | dict = {} | A dictionary mapping thread or greenlet identifiers to their respective local attribute dictionaries. |
| ident_func | callable = get_ident | A callable function used to retrieve the current execution context identifier, such as a thread ID. |
Constructor
Signature
def Local() - > null