mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-07 05:54:02 +08:00
[stdlib] add multiprocessing.synchronize.SemLock.locked (#15065)
This commit is contained in:
@@ -12,7 +12,6 @@ multiprocessing.managers._BaseDictProxy.__reversed__
|
||||
multiprocessing.managers._BaseDictProxy.__ror__
|
||||
multiprocessing.managers._BaseDictProxy.fromkeys
|
||||
multiprocessing.process.BaseProcess.interrupt
|
||||
multiprocessing.synchronize.SemLock.locked
|
||||
|
||||
|
||||
# =========================
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
import threading
|
||||
from collections.abc import Callable
|
||||
from multiprocessing.context import BaseContext
|
||||
@@ -45,6 +46,8 @@ class SemLock:
|
||||
# These methods are copied from the wrapped _multiprocessing.SemLock object
|
||||
def acquire(self, block: bool = True, timeout: float | None = None) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
def locked(self) -> bool: ...
|
||||
|
||||
class Lock(SemLock):
|
||||
def __init__(self, *, ctx: BaseContext) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user