This commit is contained in:
Benjamin Peterson 2013-09-29 11:11:10 -04:00
commit 70157e8f02
1 changed files with 6 additions and 7 deletions

View File

@ -3044,13 +3044,6 @@ def _ThisSubProcess(q):
except pyqueue.Empty: except pyqueue.Empty:
pass pass
def _TestProcess(q):
queue = multiprocessing.Queue()
subProc = multiprocessing.Process(target=_ThisSubProcess, args=(queue,))
subProc.daemon = True
subProc.start()
subProc.join()
def _afunc(x): def _afunc(x):
return x*x return x*x
@ -3084,6 +3077,12 @@ class _file_like(object):
class TestStdinBadfiledescriptor(unittest.TestCase): class TestStdinBadfiledescriptor(unittest.TestCase):
def test_queue_in_process(self): def test_queue_in_process(self):
def _TestProcess(q):
queue = multiprocessing.Queue()
subProc = multiprocessing.Process(target=_ThisSubProcess, args=(queue,))
subProc.daemon = True
subProc.start()
subProc.join()
queue = multiprocessing.Queue() queue = multiprocessing.Queue()
proc = multiprocessing.Process(target=_TestProcess, args=(queue,)) proc = multiprocessing.Process(target=_TestProcess, args=(queue,))
proc.start() proc.start()