Threading in Python

Lee Gaines
Lee Gaines 19 Lessons 1h 30m intermediate best-practices

Python threading allows you to have different parts of your program run concurrently and can simplify your design. If you’ve got some experience in Python and want to speed up your program using threads, then this course is for you!

In this course, you’ll learn:

  • What threads are
  • How to create threads and wait for them to finish
  • How to use a ThreadPoolExecutor
  • How to avoid race conditions
  • How to use the common tools that Python threading provides

This course assumes you’ve got the Python basics down pat and that you’re using at least version 3.6 to run the examples. If you need a refresher, you can start with the Python Learning Paths and get up to speed.

If you’re not sure if you want to use Python threading, asyncio, or multiprocessing, then you can check out Speed Up Your Python Program With Concurrency.

What’s Included:

Downloadable Resources:

Related Learning Paths:

About Lee Gaines

Lee is a DevOps Engineer and Pythonista based in Berkeley, California.

» More about Lee

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Avatar image for Yuri

Yuri on June 8, 2022

Great Course! I think it is probably one of the best (if not the best) explanation of threading & queue topic I have seen on the internet! Thanks!

← Browse All Courses