async

Asynchronous programming patterns in Groovy.

Python: Multiprocessing for Parallel CPU-bound Tasks

Python multiprocessing gives you true parallelism: it runs separate Python processes, one per Central Processing Unit (CPU) core, so each escapes the Global Interpreter Lock (GIL) and your heavy math actually runs at the same time. This guide shows when to reach for it over threading, how Pool and ProcessPoolExecutor work, and how to pass data between processes with a queue. “Concurrency is not parallelism.” Rob Pike, Go Proverbs Last Updated: July 2026 | Tested on: Python 3.14.6 | Difficulty: ... Read More

Python: Asyncio, async/await for I/O Concurrency

Here is a puzzle. You fire off ten network requests, each one takes about a second, and the whole thing finishes in one second flat. No extra threads. No extra Central Processing Unit (CPU) cores. Just one thread, running one task at a time. How? Welcome to Python asyncio, where a single thread juggles thousands of waiting operations by never sitting idle. “Concurrency is about structure, parallelism is about execution.” Rob Pike, Concurrency Is Not Parallelism Last Updated: July 2026 ... Read More

Python: Multithreading (Thread, Lock, GIL)

Python multithreading, explained from the ground up: understand the Global Interpreter Lock, create threads with threading.Thread, protect shared data with locks, and learn when threading actually helps (I/O-bound tasks) versus when it does not (Central Processing Unit (CPU)-bound tasks). “Threads are easy. Correct threads are hard.” Adapted from Brian Goetz, Java Concurrency in Practice Last Updated: July 2026 | Tested on: Python 3.14.6 | Difficulty: Advanced | Reading Time: 14 minutes Here is a question that trips up almost every ... Read More