This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients gvanrossum, neologix, pitrou, serhiy.storchaka, vstinner
Date 2014-02-12.00:00:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1392163215.36.0.212581045415.issue20526@psf.upfronthosting.co.za>
In-reply-to
Content
> Are you sure? I didn't see the daemon flag in ThreadPoolExecutor.

Oh you're right, ThreadPoolExecutor does create daemon threads:

class ThreadPoolExecutor(_base.Executor):
    ...

    def _adjust_thread_count(self):
        # When the executor gets lost, the weakref callback will wake up
        # the worker threads.
        def weakref_cb(_, q=self._work_queue):
            q.put(None)
        # TODO(bquinlan): Should avoid creating new threads if there are more
        # idle threads than items in the work queue.
        if len(self._threads) < self._max_workers:
            t = threading.Thread(target=_worker,
                                 args=(weakref.ref(self, weakref_cb),
                                       self._work_queue))
            t.daemon = True   <======= HERE
            t.start()
            self._threads.add(t)
            _threads_queues[t] = self._work_queue
History
Date User Action Args
2014-02-12 00:00:15vstinnersetrecipients: + vstinner, gvanrossum, pitrou, neologix, serhiy.storchaka
2014-02-12 00:00:15vstinnersetmessageid: <1392163215.36.0.212581045415.issue20526@psf.upfronthosting.co.za>
2014-02-12 00:00:15vstinnerlinkissue20526 messages
2014-02-12 00:00:14vstinnercreate