mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Add mp_context parameter to concurrent.futures.ProcessPoolExecutor (#3078)
Closes #3076
This commit is contained in:
committed by
Sebastian Rittau
parent
2b6a99c39c
commit
9941616b9e
@@ -1,4 +1,4 @@
|
||||
from typing import TypeVar, Generic, Any, Iterable, Iterator, Callable, Tuple, Optional, Set, NamedTuple
|
||||
from typing import TypeVar, Generic, Any, Iterable, Iterator, Callable, Tuple, Optional, Set
|
||||
from types import TracebackType
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from typing import Any, Callable, Optional, Tuple
|
||||
from ._base import Future, Executor
|
||||
from ._base import Executor
|
||||
import sys
|
||||
|
||||
EXTRA_QUEUED_CALLS: Any
|
||||
@@ -8,8 +8,11 @@ if sys.version_info >= (3,):
|
||||
class BrokenProcessPool(RuntimeError): ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
from multiprocessing.context import BaseContext
|
||||
|
||||
class ProcessPoolExecutor(Executor):
|
||||
def __init__(self, max_workers: Optional[int] = ...,
|
||||
mp_context: Optional[BaseContext] = ...,
|
||||
initializer: Optional[Callable[..., None]] = ...,
|
||||
initargs: Tuple[Any, ...] = ...) -> None: ...
|
||||
else:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from typing import Any, Callable, Optional, Tuple
|
||||
from ._base import Executor, Future
|
||||
from ._base import Executor
|
||||
import sys
|
||||
|
||||
class ThreadPoolExecutor(Executor):
|
||||
|
||||
Reference in New Issue
Block a user