Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Lib/concurrent/futures/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ class BrokenProcessPool(_base.BrokenExecutor):

class ProcessPoolExecutor(_base.Executor):
def __init__(self, max_workers=None, mp_context=None,
initializer=None, initargs=()):
initializer=None, initargs=(), daemon=True):
"""Initializes a new ProcessPoolExecutor instance.

Args:
Expand Down Expand Up @@ -520,6 +520,8 @@ def __init__(self, max_workers=None, mp_context=None,
self._initializer = initializer
self._initargs = initargs

self._daemon = daemon

# Management thread
self._queue_management_thread = None

Expand Down Expand Up @@ -578,7 +580,7 @@ def weakref_cb(_,
self._result_queue,
self._queue_management_thread_wakeup),
name="QueueManagerThread")
self._queue_management_thread.daemon = True
self._queue_management_thread.daemon = self._daemon
self._queue_management_thread.start()
_threads_wakeups[self._queue_management_thread] = \
self._queue_management_thread_wakeup
Expand Down