mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Add support for multiprocessing.get_context().Process() (#1581)
This commit is contained in:
committed by
Jelle Zijlstra
parent
a4285af4c2
commit
6865c24a4c
@@ -4,7 +4,7 @@ from logging import Logger
|
||||
import multiprocessing
|
||||
import sys
|
||||
from typing import (
|
||||
Any, Callable, Iterable, Optional, List, Sequence, Tuple, Type, Union,
|
||||
Any, Callable, Iterable, Optional, List, Mapping, Sequence, Tuple, Type, Union,
|
||||
)
|
||||
|
||||
class ProcessError(Exception): ...
|
||||
@@ -61,6 +61,16 @@ class BaseContext(object):
|
||||
initargs: Iterable[Any] = ...,
|
||||
maxtasksperchild: Optional[int] = ...
|
||||
) -> multiprocessing.pool.Pool: ...
|
||||
def Process(
|
||||
self,
|
||||
group: Any = ...,
|
||||
target: Optional[Callable] = ...,
|
||||
name: Optional[str] = ...,
|
||||
args: Iterable[Any] = ...,
|
||||
kwargs: Mapping[Any, Any] = ...,
|
||||
*,
|
||||
daemon: Optional[bool] = ...
|
||||
) -> multiprocessing.Process: ...
|
||||
# TODO: typecode_or_type param is a ctype with a base class of _SimpleCData or array.typecode Need to figure out
|
||||
# how to handle the ctype
|
||||
# TODO: change return to RawValue once a stub exists in multiprocessing.sharedctypes
|
||||
|
||||
Reference in New Issue
Block a user