Skip to content

Commit 050ec19

Browse files
authored
[stdlib] add multiprocessing.synchronize.SemLock.locked (#15065)
1 parent d5e3a97 commit 050ec19

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
@@ -12,7 +12,6 @@ multiprocessing.managers._BaseDictProxy.__reversed__
1212
multiprocessing.managers._BaseDictProxy.__ror__
1313
multiprocessing.managers._BaseDictProxy.fromkeys
1414
multiprocessing.process.BaseProcess.interrupt
15-
multiprocessing.synchronize.SemLock.locked
1615

1716

1817
# =========================

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)