From 9346e22dd064b8636a77c302648b322f354bdb30 Mon Sep 17 00:00:00 2001 From: Satyam Kumar Verman Date: Mon, 24 Nov 2025 09:36:09 -0500 Subject: [PATCH] gh-141831: Document behavior of functools.lru_cache with concurrent access (gh-141869) --- Doc/library/functools.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 97136b234084..221c0712c7c9 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -57,6 +57,10 @@ The :mod:`functools` module defines the following functions: another thread makes an additional call before the initial call has been completed and cached. + Call-once behavior is not guaranteed because locks are not held during the + function call. Potentially another call with the same arguments could + occur while the first call is still running. + .. versionadded:: 3.9 -- 2.47.3