Skip to content

Commit 78c66a6

Browse files
authored
bpo-31069, test_multiprocessing: Fix dangling process (#3103) (#3104)
Fix a warning about dangling processes in test_rapid_restart() of _test_multiprocessing: join the process. (cherry picked from commit 17657bb)
1 parent 98e2697 commit 78c66a6

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
@@ -2425,12 +2425,13 @@ def test_rapid_restart(self):
24252425
manager.start()
24262426

24272427
p = self.Process(target=self._putter, args=(manager.address, authkey))
2428-
p.daemon = True
24292428
p.start()
2429+
p.join()
24302430
queue = manager.get_queue()
24312431
self.assertEqual(queue.get(), 'hello world')
24322432
del queue
24332433
manager.shutdown()
2434+
24342435
manager = QueueManager(
24352436
address=addr, authkey=authkey, serializer=SERIALIZER)
24362437
try:

0 commit comments

Comments
 (0)