mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 16:27:08 +08:00
address some multiprocessing allowlist entries (#13080)
This commit is contained in:
@@ -10,7 +10,7 @@ _LockLike: TypeAlias = Lock | RLock
|
||||
|
||||
class Barrier(threading.Barrier):
|
||||
def __init__(
|
||||
self, parties: int, action: Callable[[], object] | None = None, timeout: float | None = None, *ctx: BaseContext
|
||||
self, parties: int, action: Callable[[], object] | None = None, timeout: float | None = None, *, ctx: BaseContext
|
||||
) -> None: ...
|
||||
|
||||
class Condition:
|
||||
@@ -19,12 +19,14 @@ class Condition:
|
||||
def notify_all(self) -> None: ...
|
||||
def wait(self, timeout: float | None = None) -> bool: ...
|
||||
def wait_for(self, predicate: Callable[[], bool], timeout: float | None = None) -> bool: ...
|
||||
def acquire(self, block: bool = ..., timeout: float | None = ...) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
def __enter__(self) -> bool: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, /
|
||||
) -> None: ...
|
||||
# These methods are copied from the lock passed to the constructor, or an
|
||||
# instance of ctx.RLock() if lock was None.
|
||||
def acquire(self, block: bool = True, timeout: float | None = None) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
|
||||
class Event:
|
||||
def __init__(self, *, ctx: BaseContext) -> None: ...
|
||||
@@ -35,12 +37,14 @@ class Event:
|
||||
|
||||
# Not part of public API
|
||||
class SemLock:
|
||||
def acquire(self, block: bool = ..., timeout: float | None = ...) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
def __init__(self, kind: int, value: int, maxvalue: int, *, ctx: BaseContext | None) -> None: ...
|
||||
def __enter__(self) -> bool: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, /
|
||||
) -> None: ...
|
||||
# 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: ...
|
||||
|
||||
class Lock(SemLock):
|
||||
def __init__(self, *, ctx: BaseContext) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user