Skip to content

Commit 35c93ab

Browse files
committed
[stdlib] add multiprocessing.synchronize.SemLock.locked
1 parent cc79232 commit 35c93ab

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

stdlib/@tests/stubtest_allowlists/py314.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ multiprocessing.managers._BaseDictProxy.__reversed__
1111
multiprocessing.managers._BaseDictProxy.__ror__
1212
multiprocessing.managers._BaseDictProxy.fromkeys
1313
multiprocessing.process.BaseProcess.interrupt
14-
multiprocessing.synchronize.SemLock.locked
1514

1615

1716
# =========================

stdlib/multiprocessing/synchronize.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import threading
23
from collections.abc import Callable
34
from multiprocessing.context import BaseContext
@@ -45,6 +46,8 @@ class SemLock:
4546
# These methods are copied from the wrapped _multiprocessing.SemLock object
4647
def acquire(self, block: bool = True, timeout: float | None = None) -> bool: ...
4748
def release(self) -> None: ...
49+
if sys.version_info >= (3, 14):
50+
def locked(self) -> bool: ...
4851

4952
class Lock(SemLock):
5053
def __init__(self, *, ctx: BaseContext) -> None: ...

0 commit comments

Comments
 (0)