Threading in Python
Lee Gaines 19 Lessons 1h 30m
best-practices intermediate
Python threading allows you to have di erent 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 article, 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.
0% Completed Watch Now
Let’s Get Started!
Threading in Python
19 Lessons 1h 30m
Help
1. Threading in Python: Overview (01:07)
2. What Is a Thread? (03:08)
3. A Single Thread (02:05)
4. Two Threads (05:38)
5. Daemon Threads (03:26)
6. Joining Threads (03:21)
7. Multiple Threads (04:04)
8. Thread Pool (03:55)
9. Race Conditions (01:50)
10. Example: Bank Account Program (08:03)
11. Lock Objects (04:35)
12. More Locks (04:30)
13. The Producer-Consumer Pipeline: Part 1 (01:42)
14. The Producer-Consumer Pipeline: Part 2 (11:33)
15. The Producer-Consumer Pipeline: Part 3 (06:36)
16. The queue Module: Part 1 (13:59)
17. The queue Module: Part 2 (04:20)
18. Semaphore Objects (05:19)
19. Threading in Python: Summary (01:16)
Watch Now
Mark as Completed
About Lee Gaines
Lee is an avid Pythonista and video instructor at Real Python.
» 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:
Dan Tappan Joanna
Jim Aldren Brad
« Browse All Courses
© 2012–2019 Real Python ⋅ Privacy Policy