gh-80961: Add daemon parameter to ThreadPoolExecutor by hniksic · Pull Request #13250 · python/cpython

brianquinlan

@hniksic hniksic mannequin mentioned this pull request

Apr 10, 2022

@hniksic

Add `daemon=False` keyword-only parameter to ThreadPoolExecutor.
When True, worker threads are created as daemon threads and are not
registered in the global _threads_queues, allowing the interpreter
to exit without waiting for them to finish.

@hniksic hniksic changed the title bpo-36780: Add wait_at_exit to ThreadPoolExecutor.shutdown. gh-80961: Add daemon parameter to ThreadPoolExecutor

Mar 7, 2026