mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Issue #18999: Make multiprocessing use context objects.
This allows different parts of a program to use different methods for starting processes without interfering with each other.
This commit is contained in:
parent
3e4b52875e
commit
b1694cf588
20 changed files with 733 additions and 611 deletions
|
@ -16,7 +16,7 @@ import tempfile
|
|||
import threading
|
||||
import _multiprocessing
|
||||
|
||||
from . import popen
|
||||
from . import context
|
||||
from . import reduction
|
||||
from . import util
|
||||
|
||||
|
@ -50,7 +50,7 @@ if sys.platform == 'win32':
|
|||
self._state = (self.size, self.name)
|
||||
|
||||
def __getstate__(self):
|
||||
popen.assert_spawning(self)
|
||||
context.assert_spawning(self)
|
||||
return self._state
|
||||
|
||||
def __setstate__(self, state):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue