Skip to content

Commit a8f6142

Browse files
set multiprocessing start method to spawn
1 parent f9e2e64 commit a8f6142

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pedantic/decorators/fn_deco_in_subprocess.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import asyncio
22
import inspect
3+
import multiprocessing
34
from functools import wraps
45
from typing import Callable, TypeVar, Any, Awaitable, Optional, Type, Union
56

67
try:
78
from multiprocess import Process, Pipe
89
from multiprocess.connection import Connection
10+
11+
multiprocessing.set_start_method(method="spawn", force=True)
912
except ImportError:
1013
Process: Optional[Type] = None
1114
Pipe: Optional[Type] = None

pedantic/type_checking_logic/check_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import types
44
import typing
55
from io import BytesIO, StringIO, BufferedWriter, TextIOWrapper
6-
from typing import Any, Dict, Iterable, ItemsView, Callable, Union, Optional, Tuple, Mapping, TypeVar, NewType, \
6+
from typing import Any, Dict, Iterable, ItemsView, Callable, Optional, Tuple, Mapping, TypeVar, NewType, \
77
_ProtocolMeta
88
import collections
99

0 commit comments

Comments
 (0)