🌐
Python.org
discuss.python.org › ideas
Graceful exit from ThreadPoolExecutor when blocked on IO - problem and possible enhancement - Ideas - Discussions on Python.org
February 11, 2025 - (This is my first post here so apologies if it’s pitched wrong.) I think something is missing from ThreadPoolExecutor, or perhaps its documentation. I have a program doing essentially the example in documentation, but wrapped in a long-running loop that polls for a list of URLs to fetch and ...
🌐
Python.org
discuss.python.org › python help
ThreadPoolExecutor.map with buffersize returns truncated iterable under certain circumstances - Python Help - Discussions on Python.org
October 15, 2025 - Hi folks! I am wondering why my first example of ThreadPoolExecutor(max_workers=10).map(fn, iterable, buffersize=20) returns only 20 mapped items of 100. Using CPython 3.14.0. Looking at the implementation of map() the…
🌐
Super Fast Python
superfastpython.com › home › tutorials › threadpoolexecutor in python: the complete guide
ThreadPoolExecutor in Python: The Complete Guide - Super Fast Python
November 23, 2023 - Python ThreadPoolExecutor, your complete guide to thread pools and the ThreadPoolExecutor class for concurrent programming in Python.
🌐
Krython
krython.com › tutorial › python › thread-pools-concurrent-futures
📘 Thread Pools: concurrent.futures - Tutorial | Krython
July 7, 2025 - from concurrent.futures import ThreadPoolExecutor, as_completed import time # 🎯 Basic thread pool usage def process_item(item): """Simulate some work""" time.sleep(1) # 😴 Pretend we're doing something return f"Processed {item}! ✅" # Create and use a thread pool with ThreadPoolExecutor(max_workers=3) as executor: # 🚀 Submit tasks items = ['apple', 'banana', 'cherry'] futures = [executor.submit(process_item, item) for item in items] # 📊 Get results as they complete for future in as_completed(futures): result = future.result() print(result)
🌐
Medium
medium.com › @superfastpython › python-threadpoolexecutor-7-day-crash-course-78d4846d5acc
Python ThreadPoolExecutor: 7-Day Crash Course | by Super Fast Python | Medium
December 3, 2023 - Python ThreadPoolExecutor: 7-Day Crash Course The Python ThreadPoolExecutor allows us to create and manage thread pools in Python. Although the ThreadPoolExecutor has been available since Python 3.2 …
🌐
Python
docs.python.org › 3 › library › concurrent.futures.html
concurrent.futures — Launching parallel tasks
January 30, 2026 - A ThreadPoolExecutor subclass that executes calls asynchronously using a pool of at most max_workers threads. Each thread runs tasks in its own interpreter. The worker interpreters are isolated from each other, which means each has its own runtime ...
Find elsewhere
🌐
Medium
blog.wahab2.com › python-threadpoolexecutor-use-cases-for-parallel-processing-3d5c90fd5634
Python ThreadPoolExecutor: Use Cases for Parallel Processing | by Abdul Rafee Wahab | Medium
August 23, 2023 - ThreadPoolExecutor is a built-in Python module that allows us to create a pool of threads to execute tasks in parallel.
🌐
TutorialsPoint
tutorialspoint.com › concurrency_in_python › concurrency_in_python_pool_of_processes.htm
Concurrency in Python - Pool of Processes
We need to choose ProcessPoolExecutor in case of CPU-bound workloads and ThreadPoolExecutor in case of I/O-bound workloads. If we use ProcessPoolExecutor, then we do not need to worry about GIL because it uses multiprocessing. Moreover, the execution time will be less when compared to ThreadPoolExecution. Consider the following Python script example to understand this.
🌐
Hacker News
news.ycombinator.com › item
Python's threadpoolexecutor is still single OS-threaded. There will only ever be... | Hacker News
May 25, 2020 - Multi-process code can, of course, address some of these issues, but it comes at the cost of spinning up multiple OS processes and costly inter-process communication etc · For one, regardless of the GIL it is still possible to have races in multithreaded python code.
🌐
Medium
medium.com › @anupchakole › understanding-threadpoolexecutor-2eed095d21aa
Understanding ThreadPoolExecutor. ThreadPoolExecutor is a Python class… | by Anup Chakole | Medium
August 28, 2024 - Understanding ThreadPoolExecutor ThreadPoolExecutor is a Python class from the concurrent.futures module that provides a high-level interface for asynchronously executing tasks in a thread pool. This …
🌐
Super Fast Python
superfastpython.com › home › tutorials › how to use threadpoolexecutor submit()
How to use ThreadPoolExecutor submit() - Super Fast Python
August 3, 2023 - The ThreadPoolExecutor provides a pool of reusable worker threads using the executor design pattern. Tasks executed in new threads are executed concurrently in Python, making the ThreadPoolExecutor appropriate for I/O-bound tasks.
🌐
Super Fast Python
superfastpython.com › home › tutorials › how to use threadpoolexecutor timeouts
How to Use ThreadPoolExecutor Timeouts - Super Fast Python
August 23, 2023 - The ThreadPoolExecutor provides a pool of reusable worker threads using the executor design pattern. Tasks executed in new threads are executed concurrently in Python, making the ThreadPoolExecutor appropriate for I/O-bound tasks.
🌐
GitConnected
levelup.gitconnected.com › understanding-pythons-threadpoolexecutor-futures-and-concurrency-genai-use-case-for-multiple-c28251ae9edf
Understanding Python’s ThreadPoolExecutor, Futures, and Concurrency: GenAI Use Case for Multiple Document Processing | by Amit Chauhan | Level Up Coding
January 7, 2025 - Understanding Python’s ThreadPoolExecutor, Futures, and Concurrency: GenAI Use Case for Multiple Document Processing Perform multiple tasks in parallel. In this article, we will discuss processing …
🌐
Python.org
discuss.python.org › python help
Concurrent usage of concurrent.futures.ThreadPoolExecutor - Python Help - Discussions on Python.org
December 8, 2023 - Is concurrent.futures.ThreadPoolExecutor safe to use concurrently? I seem to run into a deadlock when I have a concurrent.futures.ThreadPoolExecutor.map call when the function being mapped submits additional tasks to th…
🌐
Tiew Kee Hui's Blog
tiewkh.github.io › blog › python-thread-pool-executor
Shutting Down Python's ThreadPoolExecutor
July 10, 2021 - ThreadPoolExecutor is the recommended way to perform multithreading in Python.
🌐
Medium
medium.com › towardsdev › whats-the-best-way-to-handle-concurrency-in-python-threadpoolexecutor-or-asyncio-85da1be58557
What’s the Best Way to Handle Concurrency in Python: ThreadPoolExecutor or asyncio? | by Soumit Salman Rahman | Towards Dev
July 28, 2025 - It is designed primarily for I/O-bound tasks. It functions differently from ThreadPoolExecutor. Unlike ThreadPoolExecutor, it runs everything within one thread so there is no thread creation and cleanup overhead.
🌐
Python
docs.python.org › 3 › library › multiprocessing.html
multiprocessing — Process-based parallelism
February 23, 2026 - Changed in version 3.12: If Python is able to detect that your process has multiple threads, the os.fork() function that this start method calls internally will raise a DeprecationWarning. Use a different start method.