massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2 / multiprocessing / pool.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2/multiprocessing/pool.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2/multiprocessing/pool.pyi
new file mode 100644 (file)
index 0000000..0a85694
--- /dev/null
@@ -0,0 +1,57 @@
+from typing import (\r
+    Any, Callable, ContextManager, Iterable, Optional, Dict, List,\r
+    TypeVar, Iterator,\r
+)\r
+\r
+_T = TypeVar('_T', bound=Pool)\r
+\r
+class AsyncResult():\r
+    def get(self, timeout: Optional[float] = ...) -> Any: ...\r
+    def wait(self, timeout: Optional[float] = ...) -> None: ...\r
+    def ready(self) -> bool: ...\r
+    def successful(self) -> bool: ...\r
+\r
+class IMapIterator(Iterable[Any]):\r
+    def __iter__(self) -> Iterator[Any]: ...\r
+    def next(self, timeout: Optional[float] = ...) -> Any: ...\r
+\r
+class Pool(ContextManager[Pool]):\r
+    def __init__(self, processes: Optional[int] = ...,\r
+                 initializer: Optional[Callable[..., None]] = ...,\r
+                 initargs: Iterable[Any] = ...,\r
+                 maxtasksperchild: Optional[int] = ...) -> None: ...\r
+    def apply(self,\r
+              func: Callable[..., Any],\r
+              args: Iterable[Any] = ...,\r
+              kwds: Dict[str, Any] = ...) -> Any: ...\r
+    def apply_async(self,\r
+                func: Callable[..., Any],\r
+                args: Iterable[Any] = ...,\r
+                kwds: Dict[str, Any] = ...,\r
+                callback: Optional[Callable[..., None]] = ...) -> AsyncResult: ...\r
+    def map(self,\r
+            func: Callable[..., Any],\r
+            iterable: Iterable[Any] = ...,\r
+            chunksize: Optional[int] = ...) -> List[Any]: ...\r
+    def map_async(self, func: Callable[..., Any],\r
+                  iterable: Iterable[Any] = ...,\r
+                  chunksize: Optional[int] = ...,\r
+                  callback: Optional[Callable[..., None]] = ...) -> AsyncResult: ...\r
+    def imap(self,\r
+             func: Callable[..., Any],\r
+             iterable: Iterable[Any] = ...,\r
+             chunksize: Optional[int] = ...) -> IMapIterator: ...\r
+    def imap_unordered(self,\r
+                       func: Callable[..., Any],\r
+                       iterable: Iterable[Any] = ...,\r
+                       chunksize: Optional[int] = ...) -> IMapIterator: ...\r
+    def close(self) -> None: ...\r
+    def terminate(self) -> None: ...\r
+    def join(self) -> None: ...\r
+    def __enter__(self: _T) -> _T: ...\r
+\r
+class ThreadPool(Pool, ContextManager[ThreadPool]):\r
+\r
+    def __init__(self, processes: Optional[int] = ...,\r
+                 initializer: Optional[Callable[..., Any]] = ...,\r
+                 initargs: Iterable[Any] = ...) -> None: ...\r