Add stub for multiprocessing.Value.get_lock() (#2920)

I also noticed that the "lock" parameter for Value's __init__ was
incomplete. The parameter also accepts lock objects directly.

https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.Value

Fixes #2917
This commit is contained in:
Philipp Schrader
2019-04-13 11:35:52 -07:00
committed by Jelle Zijlstra
parent efb67946f8
commit d9c5422ebf

View File

@@ -68,7 +68,8 @@ class Process():
class Value():
value: Any = ...
def __init__(self, typecode_or_type: str, *args: Any, lock: bool = ...) -> None: ...
def __init__(self, typecode_or_type: str, *args: Any, lock: Union[bool, _LockLike] = ...) -> None: ...
def get_lock(self) -> _LockLike: ...
# ----- multiprocessing function stubs -----
def active_children() -> List[Process]: ...