Python Concurrent Programming: Multithreading in Python

Expected Duration
Lesson Objectives
Course Number
Expertise Level


This course offers an in-depth exploration of the creation and management of concurrent threads in Python. In its 14 videos, you will learn how to significantly improve the performance and responsiveness of your apps by using concurrent threads. Begin by examining how threads are created in Python from their initialization to their execution; then learn how to use the various synchronization mechanisms such as locks, semaphores, and events. Next, you will examine how concurrent execution could occur in two ways: multithreading and parallel. You will learn to use multithreading to run chunks of each task at one time, and then switch between them regularly. You will learn multiprocessing of threads by executing tasks in parallel. Learners will examine concurrent execution of threads, and some of the issues that arise when these threads are not synchronized. Finally, you will examine several threads of synchronization mechanisms available in Python such as locks, semaphores, events, and conditions and explore the properties and use cases for each of these objects.

Expected Duration (hours)

Lesson Objectives

Python Concurrent Programming: Multithreading in Python

  • discover the key concepts covered in this course
  • initialize and execute a thread in Python
  • set a name for a thread and ensure a thread waits for a created thread to complete
  • define your own type to run in a thread by deriving the multithreading.Thread class
  • execute two threads concurrently to save time relative to a sequential execution
  • identify what a race condition is and when this may occur with multithreading
  • use a lock to synchronize threads that update a shared resource
  • recognize the conditions under which a deadlock may occur
  • define tasks in such a manner that deadlocks will not occur
  • create semaphores in Python and recognize the effect of calling their acquire and release methods
  • describe the use of BoundedSemaphores to restrict the number of times a semaphore can be released
  • define threads that will wait for an event to occur before they can proceed
  • create a condition instance that will have multiple threads waiting for data to be generated
  • recall how to retrieve details about running threads and describe semaphores in Python
  • Course Number:

    Expertise Level