mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 04:11:28 +08:00
multiprocessing.Value can also take a Type (#3200)
This commit is contained in:
committed by
Sebastian Rittau
parent
d5a918de7b
commit
e252094354
@@ -2,9 +2,10 @@
|
||||
|
||||
from typing import (
|
||||
Any, Callable, ContextManager, Iterable, Mapping, Optional, Dict, List,
|
||||
Union, Sequence, Tuple
|
||||
Union, Sequence, Tuple, Type
|
||||
)
|
||||
|
||||
from ctypes import _CData
|
||||
from logging import Logger
|
||||
from multiprocessing import connection, pool, spawn, synchronize
|
||||
from multiprocessing.context import (
|
||||
@@ -68,7 +69,7 @@ class Process():
|
||||
|
||||
class Value():
|
||||
value: Any = ...
|
||||
def __init__(self, typecode_or_type: str, *args: Any, lock: Union[bool, _LockLike] = ...) -> None: ...
|
||||
def __init__(self, typecode_or_type: Union[str, Type[_CData]], *args: Any, lock: Union[bool, _LockLike] = ...) -> None: ...
|
||||
def get_lock(self) -> _LockLike: ...
|
||||
|
||||
# ----- multiprocessing function stubs -----
|
||||
|
||||
Reference in New Issue
Block a user