File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
src/typed_diskcache/implement/sync Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,13 @@ class AsyncLock(AsyncLockProtocol):
264264 expire: Expiration time for lock.
265265 tags: Tags for lock.
266266
267+ Warns:
268+ RuntimeWarning:
269+ If the current Python interpreter is free-threading (without GIL),
270+ using [`AsyncLock`][typed_diskcache.AsyncLock] may lead to
271+ unexpected behavior. Consider using
272+ [`SyncLock`][typed_diskcache.SyncLock] instead in such cases.
273+
267274 Examples:
268275 ```python
269276 import typed_diskcache
@@ -381,6 +388,13 @@ class AsyncRLock(AsyncLock):
381388 expire: Expiration time for lock.
382389 tags: Tags for lock.
383390
391+ Warns:
392+ RuntimeWarning:
393+ If the current Python interpreter is free-threading (without GIL),
394+ using [`AsyncRLock`][typed_diskcache.AsyncRLock] may lead to
395+ unexpected behavior. Consider using
396+ [`SyncRLock`][typed_diskcache.SyncRLock] instead in such cases.
397+
384398 Examples:
385399 ```python
386400 import typed_diskcache
Original file line number Diff line number Diff line change @@ -192,6 +192,13 @@ class AsyncSemaphore(AsyncSemaphoreProtocol):
192192 expire: Expiration time for semaphore.
193193 tags: Tags for semaphore.
194194
195+ Warns:
196+ RuntimeWarning:
197+ If the current Python interpreter is free-threading (without GIL),
198+ using [`AsyncSemaphore`][typed_diskcache.AsyncSemaphore] may lead to
199+ unexpected behavior. Consider using
200+ [`SyncSemaphore`][typed_diskcache.SyncSemaphore] instead in such cases.
201+
195202 Examples:
196203 ```python
197204 import typed_diskcache
You can’t perform that action at this time.
0 commit comments