Skip to main content

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

AttributeTypeDescription
storagedict = {}A dictionary mapping thread or greenlet identifiers to their respective local attribute dictionaries.
ident_funccallable = get_identA callable function used to retrieve the current execution context identifier, such as a thread ID.

Constructor

Signature

def Local() - > null