mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Make Lock usable as contect manager (#1314)
This commit is contained in:
committed by
Matthias Kramm
parent
df657161f0
commit
9b2b60eafc
@@ -9,6 +9,8 @@ from multiprocessing.process import current_process as current_process
|
||||
class Lock():
|
||||
def acquire(self, block: bool = ..., timeout: int = ...) -> None: ...
|
||||
def release(self) -> None: ...
|
||||
def __enter__(self) -> 'Lock': ...
|
||||
def __exit__(self, exc_type, exc_value, tb) -> None: ...
|
||||
|
||||
class AsyncResult():
|
||||
def get(self, timeout: float = ...) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user