cpython/Lib
Miss Islington (bot) 7f5302fed4
bpo-39360: Ensure all workers exit when finalizing a multiprocessing Pool (GH-19009)
When the pull is not used via the context manager or terminate() is called, there is a system in multiprocessing.util that handles finalization of all pools via an atexit handler (the Finalize) class. This class registers the _terminate_pool handler in the registry of finalizers of the module, and that registry is called on interpreter exit via _exit_function. The problem is that the "happy" path with the context manager or manual call to finalize() does some extra steps that _terminate_pool does not. The step that is not executed when the atexit() handler calls _terminate_pool is pinging the _change_notifier queue to unblock the maintenance threads.

This commit moves the notification to the _terminate_pool function so is called from both code paths.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit ac10e0c932)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
2020-03-15 14:26:43 -07:00
..
asyncio bpo-39764: Make Task.get_stack accept ag_frame (GH-18669) 2020-03-02 05:03:50 -08:00
collections
concurrent
ctypes bpo-16575: Disabled checks for union types being passed by value. (GH-17960) (GH-17964) 2020-01-12 11:41:07 +00:00
curses
dbm
distutils bpo-38597: Never statically link extension initialization code on Windows (GH-18724) 2020-03-02 16:30:18 -08:00
email bpo-38708: email: Fix a potential IndexError when parsing Message-ID (GH-17504) 2019-12-08 18:12:50 -08:00
encodings bpo-30566: Fix IndexError when using punycode codec (GH-18632) 2020-02-25 06:42:39 +03:00
ensurepip bpo-38662: ensurepip invokes pip via runpy (GH-18901) 2020-03-10 14:37:50 -07:00
html
http bpo-38576: Disallow control characters in hostnames in http.client (GH-18995) 2020-03-14 12:13:32 -07:00
idlelib bpo-27115: Use Query subclass for IDLE editor Goto (GH-18871) 2020-03-09 16:45:19 -07:00
importlib bpo-39595: Improve zipfile.Path performance (GH-18406) (GH-18472) 2020-02-11 22:21:32 -05:00
json [3.8] bpo-39828: Fix json.tool to catch BrokenPipeError (GH-18779). (GH-18894) 2020-03-10 01:14:08 -07:00
lib2to3 bpo-38871: Fix lib2to3 for filter-based statements that contain lambda (GH-17780) 2020-01-07 09:52:06 -08:00
logging bpo-39198: Ensure logging global lock is released on exception in isEnabledFor (GH-17689) (GH-17897) 2020-01-07 17:03:23 +00:00
msilib
multiprocessing bpo-39360: Ensure all workers exit when finalizing a multiprocessing Pool (GH-19009) 2020-03-15 14:26:43 -07:00
pydoc_data Python 3.8.2 2020-02-24 22:36:25 +01:00
site-packages
sqlite3 bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. (GH-16190) 2019-09-16 23:39:11 -07:00
test bpo-39360: Ensure all workers exit when finalizing a multiprocessing Pool (GH-19009) 2020-03-15 14:26:43 -07:00
tkinter bpo-39152: add missing ttk.Scale.configure return value (GH-17815) 2020-01-05 09:07:30 -08:00
turtledemo
unittest bpo-39915: Ensure await_args_list is updated according to the order in which coroutines were awaited (GH-18927) 2020-03-14 07:12:57 +00:00
urllib bpo-39548: Fix handling of 'WWW-Authenticate' header for Digest Auth (GH-18338) 2020-02-29 13:05:23 -08:00
venv bpo-39505: delete the redundant '/' in $env:VIRTUAL_ENV (GH-18290) (GH-18359) 2020-02-05 08:39:36 +00:00
wsgiref
xml
xmlrpc bpo-38243, xmlrpc.server: Escape the server_title (GH-16373) 2019-09-27 13:19:41 -07:00
__future__.py
__phello__.foo.py
_bootlocale.py
_collections_abc.py
_compat_pickle.py
_compression.py
_dummy_thread.py
_markupbase.py
_osx_support.py
_py_abc.py
_pydecimal.py [3.8] bpo-39794: Add --without-decimal-contextvar (GH-18702) 2020-02-29 22:16:32 +01:00
_pyio.py [3.8] closes bpo-27805: Ignore ESPIPE in initializing seek of append-mode files. (GH-17136) 2019-11-12 15:54:19 -08:00
_sitebuiltins.py
_strptime.py
_threading_local.py
_weakrefset.py
abc.py
aifc.py
antigravity.py
argparse.py [3.8] bpo-39546: argparse: Honor allow_abbrev=False for specified prefix_chars (GH-18337) (GH-18543) 2020-02-18 03:14:07 -08:00
ast.py Fix syntax error in an example in the ast documentation and sync docstrings (GH-18946) 2020-03-11 18:06:53 -07:00
asynchat.py
asyncore.py
base64.py bpo-39055: Reject a trailing \n in base64.b64decode() with validate=True. (GH-17616) 2020-01-05 04:36:48 -08:00
bdb.py bpo-39649: Remove obsolete check for `__args__` in bdb.Bdb.format_stack_entry (GH-18531) 2020-02-23 19:33:07 -08:00
binhex.py
bisect.py
bz2.py
cProfile.py
calendar.py
cgi.py bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has… (GH-10638) 2019-09-11 05:09:23 -07:00
cgitb.py
chunk.py
cmd.py
code.py Fix documentation in code.py (GH-17988) 2020-01-14 12:13:59 -08:00
codecs.py bpo-38971: Open file in codecs.open() closes if exception raised. (GH-17666) 2020-03-02 00:03:08 -08:00
codeop.py bpo-36820: Break unnecessary cycle in socket.py, codeop.py and dyld.py (GH-13135) 2019-12-06 06:59:49 -08:00
colorsys.py
compileall.py bpo-39769: Fix compileall ddir for subpkgs. (GH-18676) (GH-18718) 2020-03-01 10:42:56 -08:00
configparser.py
contextlib.py
contextvars.py
copy.py bpo-38293: Allow shallow and deep copying of property objects (GH-16438) 2020-01-12 10:04:18 -08:00
copyreg.py
crypt.py
csv.py
dataclasses.py bpo-34776: Fix dataclasses to support __future__ "annotations" mode (GH-9518) (#17531) 2019-12-09 17:07:51 +01:00
datetime.py
decimal.py
difflib.py [3.8] bpo-38738: Fix formatting of True and False. (GH-17083) (GH-17125) 2019-11-12 18:54:10 +02:00
dis.py bpo-38115: Deal with invalid bytecode offsets in lnotab (GH-16079) (GH-16464) 2019-09-28 08:22:00 -07:00
doctest.py bpo-36406: Handle namespace packages in doctest (GH-12520) (GH-17591) 2019-12-13 15:30:41 -08:00
dummy_threading.py
enum.py Doc: Fix spelling errors of 'initial' in enum.py (GH-16314) 2019-09-20 22:41:35 -07:00
filecmp.py
fileinput.py
fnmatch.py
formatter.py
fractions.py bpo-39274: Ensure Fraction.__bool__() returns a bool (GH-18017) 2020-02-06 07:13:38 -08:00
ftplib.py
functools.py [3.8] bpo-39815: add cached_property to all (GH-18726) (GH-18728) 2020-03-02 00:08:29 +00:00
genericpath.py bpo-38807: Add os.PathLike to exception message raised by _check_arg_types (GH-17160) (GH-17249) 2019-11-18 22:46:10 -08:00
getopt.py
getpass.py
gettext.py
glob.py bpo-38149: Call sys.audit() only once per call for glob.glob(). (GH-18360) 2020-02-06 00:45:18 -08:00
gzip.py bpo-39389: gzip: fix compression level metadata (GH-18077) 2020-01-21 03:42:49 -08:00
hashlib.py [3.8] bpo-38153: Normalize hashlib algorithm names (GH-16083) (GH-16144) 2019-09-16 14:08:55 +02:00
heapq.py
hmac.py bpo-33604: Raise TypeError on missing hmac arg. (GH-16805) 2019-10-17 20:48:42 -07:00
imaplib.py
imghdr.py
imp.py
inspect.py bpo-13487: Use sys.modules.copy() in inspect.getmodule() for thread safety. (GH-18786) 2020-03-04 17:04:38 -08:00
io.py
ipaddress.py
keyword.py
linecache.py
locale.py
lzma.py
mailbox.py
mailcap.py
mimetypes.py bpo-39299: Add more tests for mimetypes and its cli. (GH-17949) 2020-02-11 07:32:40 -08:00
modulefinder.py
netrc.py
nntplib.py bpo-39242: Updated the Gmane domain into news.gmane.io (GH-17903) 2020-01-08 07:48:33 -08:00
ntpath.py bpo-38453: Ensure ntpath.realpath correctly resolves relative paths (GH-16967) 2019-11-15 15:25:03 -08:00
nturl2path.py
numbers.py
opcode.py
operator.py
optparse.py
os.py [3.8] bpo-38878: Fix os.PathLike __subclasshook__ (GH-17336) (GH-17684) 2019-12-23 18:31:00 +00:00
pathlib.py bpo-39916: Use os.scandir() as context manager in Path.glob(). (GH-18880) 2020-03-11 10:07:04 -07:00
pdb.py bpo-38723: Pdb._runscript should use io.open_code() instead of open() (GH-17127) 2019-11-12 15:09:03 -08:00
pickle.py bpo-39426: Fix outdated default and highest protocols in docs (GH-18154) 2020-01-24 02:20:35 -08:00
pickletools.py
pipes.py
pkgutil.py
platform.py
plistlib.py
poplib.py
posixpath.py
pprint.py
profile.py
pstats.py
pty.py bpo-39184: Add audit events to command execution functions in os and pty modules (GH-17824) 2020-02-04 16:32:32 -08:00
py_compile.py
pyclbr.py
pydoc.py bpo-21016: pydoc and trace use sysconfig (GH-18476) 2020-02-12 04:32:52 -08:00
queue.py
quopri.py
random.py
re.py
reprlib.py
rlcompleter.py
runpy.py bpo-39517: Allow runpy.run_path() to accept path-like objects (GH-18699) 2020-03-08 13:59:59 -07:00
sched.py
secrets.py
selectors.py
shelve.py
shlex.py Add docstring for shlex.split (GH-16740) (GH-17013) 2019-10-31 12:50:04 +00:00
shutil.py bpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`, `resource`, `shutil`, `signal`, `syslog` (GH-18407) 2020-02-13 08:30:27 +00:00
signal.py
site.py
smtpd.py
smtplib.py bpo-38341: Add SMTPNotSupportedError in the exports of smtplib (GH-16525) 2019-10-12 09:08:24 -07:00
sndhdr.py
socket.py Fix host in address of socket.create_server example. (GH-17706) 2020-01-10 21:39:01 -08:00
socketserver.py Fix typo in Lib/socketserver.py (GH-17024) 2019-11-16 10:35:08 -08:00
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py
stat.py bpo-38109: Add missing constants to Lib/stat.py (GH-16665) (GH-16690) 2019-10-10 15:50:32 +02:00
statistics.py bpo-38385: Fix iterator/iterable terminology in statistics docs (GH-17111) (GH-17113) 2019-11-12 00:04:12 -08:00
string.py
stringprep.py
struct.py
subprocess.py [3.8] bpo-35182: fix communicate() crash after child closes its pipes (GH-18117) (GH-18148) 2020-01-23 15:31:29 -08:00
sunau.py
symbol.py
symtable.py
sysconfig.py [3.8] bpo-38234: Backport init path config changes from master (GH-16423) 2019-09-26 16:17:34 +02:00
tabnanny.py
tarfile.py bpo-39430: Fix race condition in lazy imports in tarfile. (GH-18161) 2020-01-24 12:10:42 -08:00
telnetlib.py
tempfile.py bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400) 2019-11-27 21:23:14 -08:00
textwrap.py
this.py
threading.py
timeit.py
token.py
tokenize.py
trace.py bpo-21016: pydoc and trace use sysconfig (GH-18476) 2020-02-12 04:32:52 -08:00
traceback.py
tracemalloc.py
tty.py
turtle.py
types.py
typing.py bpo-39572: Document ’total’ flag of TypedDict (GH-18554) 2020-02-18 21:24:51 -08:00
uu.py bpo-38945: UU Encoding: Don't let newline in filename corrupt the output format (GH-17418) 2019-12-02 14:44:44 -08:00
uuid.py
warnings.py bpo-39056: Fix handling invalid warning category in the -W option. (GH-17618) 2020-01-05 04:33:08 -08:00
wave.py Fix a typo in wave module docstring (GH-17009) 2019-11-04 21:09:48 -08:00
weakref.py bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641) 2019-09-09 09:24:16 -07:00
webbrowser.py Fix typo from base to based (GH-18055) 2020-01-19 02:48:04 -08:00
xdrlib.py
zipapp.py
zipfile.py bpo-39595: Improve zipfile.Path performance (GH-18406) (GH-18472) 2020-02-11 22:21:32 -05:00
zipimport.py [3.8] bpo-39033: Fix NameError in zipimport during hash validation (GH-17588) (GH-17642) 2020-01-14 03:39:19 -08:00