Introduction to the Python threading module

The threading module in Python provides the necessary constructs to achieve thread based parallelism and concurrency. It includes the Thread class and the other required synchronisation primitives like RLock and semaphores.

Threading Module Updated 19 Jul 2024 1 min read

Overview

The threading module of Python provides classes and methods for implementing thread based parallelism and concurrency. The following are the classes provided by the threading module:

  • threading.Thread
  • threading.local
  • threading.lock
  • threading.RLock
  • threading.Condition
  • threading.Semaphore
  • threading.Event
  • threading.Timer
  • threading.Barrier