mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-07 05:54:02 +08:00
[stdlib] Add locked method to threading.Condition (#15075)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -40,6 +40,9 @@ concurrent.interpreters._queues.UNBOUND_REMOVE
|
||||
|
||||
importlib.util.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
|
||||
|
||||
# Condition functions are exported in __init__
|
||||
threading.Condition.locked
|
||||
multiprocessing.dummy.Condition.locked
|
||||
|
||||
# ====================================
|
||||
# Pre-existing errors from Python 3.13
|
||||
|
||||
@@ -144,6 +144,9 @@ class Condition:
|
||||
) -> None: ...
|
||||
def acquire(self, blocking: bool = True, timeout: float = -1) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
def locked(self) -> bool: ...
|
||||
|
||||
def wait(self, timeout: float | None = None) -> bool: ...
|
||||
def wait_for(self, predicate: Callable[[], _T], timeout: float | None = None) -> _T: ...
|
||||
def notify(self, n: int = 1) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user