mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
threading.Semaphore: add _value (#7952)
I've had occasion to use this multiple times. We already have _value for asyncio.locks.Semaphore See also https://github.com/python/cpython/issues/93213 Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -190,6 +190,7 @@ class Condition:
|
||||
def notifyAll(self) -> None: ... # deprecated alias for notify_all()
|
||||
|
||||
class Semaphore:
|
||||
_value: int
|
||||
def __init__(self, value: int = ...) -> None: ...
|
||||
def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ...
|
||||
def acquire(self, blocking: bool = ..., timeout: float | None = ...) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user