mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit (#3111)
* bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit * Add NEWS blurb
This commit is contained in:
parent
17657bb945
commit
ee84a60858
4 changed files with 33 additions and 0 deletions
|
@ -17,6 +17,7 @@ import os
|
|||
import sys
|
||||
import signal
|
||||
import itertools
|
||||
import threading
|
||||
from _weakrefset import WeakSet
|
||||
|
||||
#
|
||||
|
@ -311,6 +312,7 @@ class BaseProcess(object):
|
|||
sys.stderr.write('Process %s:\n' % self.name)
|
||||
traceback.print_exc()
|
||||
finally:
|
||||
threading._shutdown()
|
||||
util.info('process exiting with exitcode %d' % exitcode)
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue