Skip to content

Commit 17657bb

Browse files
authored
bpo-31069, test_multiprocessing: Fix dangling process (#3103)
Fix a warning about dangling processes in test_rapid_restart() of _test_multiprocessing: join the process.
1 parent 7cc3399 commit 17657bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2596,12 +2596,13 @@ def test_rapid_restart(self):
25962596
manager.start()
25972597

25982598
p = self.Process(target=self._putter, args=(manager.address, authkey))
2599-
p.daemon = True
26002599
p.start()
2600+
p.join()
26012601
queue = manager.get_queue()
26022602
self.assertEqual(queue.get(), 'hello world')
26032603
del queue
26042604
manager.shutdown()
2605+
26052606
manager = QueueManager(
26062607
address=addr, authkey=authkey, serializer=SERIALIZER)
26072608
try:

0 commit comments

Comments
 (0)