Concurrency and Async Programming
Learning Path ⋅ Skills: Python, Concurrency, Async IO, Global Interpreter Lock, Thread Safety, Parallel Processing, Performance Optimization, Multithreading, Code Efficiency
Unlock Python’s full potential with our concurrency and async programming path. Explore concurrency techniques, the Global Interpreter Lock, async IO, thread safety, and parallel processing to boost your program’s performance.
Concurrency and Async Programming
Learning Path ⋅ 9 Resources
Understanding Python Concurrency
Before diving deep, get an overview of what concurrency means in Python. You’ll learn about the different approaches to running code concurrently and when to use each one.
Course
Speed Up Python With Concurrency
Learn what concurrency means in Python and why you might want to use it. You'll see a simple, non-concurrent approach and then look into why you'd want threading, asyncio, or multiprocessing.
Interactive Quiz
Python Concurrency
The Global Interpreter Lock (GIL)
The GIL is a fundamental part of CPython that affects how your concurrent code runs. Understanding the GIL is key to writing efficient Python programs.
Course
Understanding Python's Global Interpreter Lock (GIL)
Python's Global Interpreter Lock or GIL, in simple words, is a mutex (or a lock) that allows only one thread to hold the control of the Python interpreter at any one time. In this video course you'll learn how the GIL affects the performance of your Python programs.
Interactive Quiz
What Is the Python Global Interpreter Lock (GIL)?
Working With Threads
Threads let you run multiple operations concurrently within a single process. Learn how to use Python’s threading module effectively and safely.
Course
Threading in Python
In this intermediate-level course, you'll learn how to use threading in your Python programs. You'll see how to create threads, how to coordinate and synchronize them, and how to handle common problems that arise in threading.
Interactive Quiz
Python Threading
Course
Thread Safety in Python: Locks and Other Techniques
Learn about the issues that can occur when your code is run in a multithreaded environment. Then you'll explore the various synchronization primitives available in Python's threading module, such as locks, which help you make your code safe.
Interactive Quiz
Python Thread Safety: Using a Lock and Other Techniques
Asynchronous Programming With asyncio
Async programming is a powerful paradigm for I/O-bound tasks. Learn how to use Python’s async/await syntax and the asyncio module to write efficient asynchronous code.
Tutorial
Getting Started With Async Features in Python
This step-by-step tutorial gives you the tools you need to start making asynchronous programming techniques a part of your repertoire. You'll learn how to use Python async features to take advantage of IO processes and free up your CPU.
Interactive Quiz
Getting Started With Async Features in Python
Course
Hands-On Python 3 Concurrency With the asyncio Module
Learn how to speed up your Python 3 programs using concurrency and the asyncio module in the standard library. See step-by-step how to leverage concurrency and parallelism in your own programs, all the way to building a complete HTTP downloader example app using asyncio and aiohttp.
Interactive Quiz
Python's asyncio: A Hands-On Walkthrough
Course
Exploring Asynchronous Iterators and Iterables
Learn to build async iterators and iterables in Python to handle async operations efficiently and write cleaner, faster code.
Interactive Quiz
Asynchronous Iterators and Iterables in Python
Going Beyond the GIL
For CPU-bound tasks, you’ll need to bypass the GIL. Learn about parallel processing techniques and Python 3.13’s new free-threading capabilities.
Tutorial
Bypassing the GIL for Parallel Processing in Python
In this tutorial, you'll take a deep dive into parallel processing in Python. You'll learn about a few traditional and several novel ways of sidestepping the global interpreter lock (GIL) to achieve genuine shared-memory parallelism of your CPU-bound tasks.
Tutorial
Python 3.13: Free Threading and a JIT Compiler
Python 3.13 enhanced Python performance. Make a custom Python build with Docker to enable free threading and a JIT compiler. Learn how these features affect the language's ecosystem.
Interactive Quiz
Python 3.13: Free Threading and a JIT Compiler
Congratulations on completing this learning path! You’ve learned how Python handles concurrency, from the fundamentals through threading, async programming, and strategies for bypassing the GIL.
Ready to apply these skills? Check out these related learning paths:
Got feedback on this learning path?
Looking for real-time conversation? Visit the Real Python Community Chat or join the next “Office Hours” Live Q&A Session. Happy Pythoning!