diff --git a/stdlib/3/multiprocessing/managers.pyi b/stdlib/3/multiprocessing/managers.pyi index a5ec399d7..ceabefbd8 100644 --- a/stdlib/3/multiprocessing/managers.pyi +++ b/stdlib/3/multiprocessing/managers.pyi @@ -5,7 +5,7 @@ import queue import threading from typing import ( - Any, Callable, ContextManager, Dict, Iterable, List, Mapping, Optional, + Any, Callable, ContextManager, Dict, Iterable, Generic, List, Mapping, Optional, Sequence, Tuple, TypeVar, Union, ) @@ -17,6 +17,13 @@ class Namespace: ... _Namespace = Namespace +class BaseProxy: ... + +class ValueProxy(BaseProxy, Generic[_T]): + def get(self) -> _T: ... + def set(self, value: _T) -> None: ... + value: _T + class BaseManager(ContextManager[BaseManager]): address: Union[str, Tuple[str, int]] def connect(self) -> None: ... @@ -40,7 +47,7 @@ class SyncManager(BaseManager): def RLock(self) -> threading.RLock: ... def Semaphore(self, value: Any = ...) -> threading.Semaphore: ... def Array(self, typecode: Any, sequence: Sequence[_T]) -> Sequence[_T]: ... - def Value(self, typecode: Any, value: _T) -> _T: ... + def Value(self, typecode: Any, value: _T) -> ValueProxy[_T]: ... def dict(self, sequence: Mapping[_KT, _VT] = ...) -> Dict[_KT, _VT]: ... def list(self, sequence: Sequence[_T] = ...) -> List[_T]: ...