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:
Richard Oudkerk 2013-10-16 16:41:56 +01:00
parent 3e4b52875e
commit b1694cf588
20 changed files with 733 additions and 611 deletions

View file

@ -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):