Skip to content
Commit 1ac829f5 authored by Arun Babu Neelicattu's avatar Arun Babu Neelicattu Committed by Randy Döring
Browse files

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
parent 603646c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment