mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
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:
committed by
Jelle Zijlstra
parent
efb67946f8
commit
d9c5422ebf
@@ -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]: ...
|
||||
|
||||
Reference in New Issue
Block a user