Skip to main content

21 docs tagged with "concurrency"

View all tags

Asyncio and Async/Await

Master Python's async/await model - coroutines, tasks, gather, event loop, async context managers, and building high-performance I/O-bound applications.

Building an Async API Service

Apply asyncio in production - async FastAPI routes, background tasks, async database access, connection pools, and handling concurrency in a real API service.

Locks, Semaphores, and Synchronization

Master Python synchronization primitives - Lock, RLock, Semaphore, Event, Condition, and Barrier - and when to use each to build correct concurrent systems.

Module 08 - Concurrency Overview

Master concurrency in Python - threading, multiprocessing, asyncio, event loops, race conditions, locks, and building production async systems.

Multiprocessing in Python

Bypass the GIL with multiprocessing - Process, Pool, shared memory, queues, pipes, and when to use processes instead of threads.

Project: Async Data Aggregation API

Build an async FastAPI service that aggregates data from multiple external APIs concurrently - with caching, rate limiting, circuit breaking, and background refresh.

Project: Concurrent Web Scraper

Build a production-grade concurrent web scraper using ThreadPoolExecutor and asyncio - rate limiting, retry logic, robots.txt compliance, and structured output.

Race Conditions and Thread Safety

Understand race conditions at the CPU level - why they happen, how to detect them, and how to write thread-safe Python code that behaves correctly under concurrency.

The Event Loop Explained

Understand Python's asyncio event loop at engineering depth - how it works, selectors, callbacks, handles, and debugging event loop issues in production.

The GIL Explained

What the GIL is, why it exists, how it works in CPython 3.12+, its performance impact, and the Python 3.13 free-threaded mode.

Threading in Python

Master Python threading - Thread creation, daemon threads, thread lifecycle, sharing state, the GIL's real impact, and when threading actually helps performance.