Make Lock usable as contect manager (#1314)

This commit is contained in:
Luka Sterbic
2017-05-23 15:00:32 -07:00
committed by Matthias Kramm
parent df657161f0
commit 9b2b60eafc

View File

@@ -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: ...