Tag

concurrent.futures

1 views collected around this technical thread.

Test Development Learning Exchange
Test Development Learning Exchange
Jun 24, 2024 · Fundamentals

Python Standard Library: 9 Essential Modules for Efficient Development

This article introduces nine powerful Python standard library modules that enhance code efficiency and readability, covering context management, iterators, concurrency, file operations, functional programming, AST parsing, type hints, data classes, and async programming.

ASTAsyncIOProgramming Fundamentals
0 likes · 4 min read
Python Standard Library: 9 Essential Modules for Efficient Development
Python Programming Learning Circle
Python Programming Learning Circle
Sep 20, 2023 · Fundamentals

Understanding Threads, Processes, GIL, and Multiprocessing in Python

This article explains the fundamental differences between threads and processes, the role of Python's Global Interpreter Lock (GIL), and provides a comprehensive guide to using the multiprocessing module and concurrent.futures for parallel execution, including code examples and synchronization primitives.

ConcurrencyGILMultiprocessing
0 likes · 41 min read
Understanding Threads, Processes, GIL, and Multiprocessing in Python
Test Development Learning Exchange
Test Development Learning Exchange
Aug 3, 2023 · Fundamentals

10 Practical Scenarios Using ThreadPoolExecutor and ProcessPoolExecutor in Python

This article presents ten practical Python examples that demonstrate how to use ThreadPoolExecutor and ProcessPoolExecutor for concurrent tasks such as executing functions, downloading files, compressing data, performing calculations, handling large datasets, lazy file reading, prime filtering, and computing Fibonacci numbers.

ConcurrencyThreadPoolconcurrent.futures
0 likes · 6 min read
10 Practical Scenarios Using ThreadPoolExecutor and ProcessPoolExecutor in Python
Python Programming Learning Circle
Python Programming Learning Circle
Jun 17, 2023 · Big Data

Accelerating Python Data Preprocessing with Multiprocessing in Three Lines of Code

This article demonstrates how to use Python's concurrent.futures module to parallelize image resizing, turning a single‑process script into a multi‑core solution with just three additional lines of code, achieving up to a six‑fold speed‑up on typical CPUs.

MultiprocessingParallel ComputingPerformance
0 likes · 7 min read
Accelerating Python Data Preprocessing with Multiprocessing in Three Lines of Code
Python Programming Learning Circle
Python Programming Learning Circle
Mar 3, 2023 · Backend Development

Accelerating Image Pre‑processing in Python with a Three‑Line Multiprocessing Trick

This article demonstrates how to boost the speed of image‑preprocessing tasks in Python by replacing a conventional single‑process loop with a three‑line concurrent.futures ProcessPoolExecutor implementation, achieving up to six‑fold performance gains on multi‑core CPUs.

Image ProcessingMultiprocessingPerformance
0 likes · 7 min read
Accelerating Image Pre‑processing in Python with a Three‑Line Multiprocessing Trick