util(threading): create an atomic cached property
This change implements a new decorator ``@atomic_cached_property` that extends `@functools.cached_property` to allow for a thread-safe atomic cached property. This also allows cached properties to function consistently across Python versions as the undocumented thread safety lock implemented in the stdlib prior to 3.12 was erroneous and has been removed since 3.12. Reference: https://docs.python.org/3/library/functools.html#functools.cached_property
Loading
Please register or sign in to comment