The threading module (cont)

The threading module provides the following synchronization primitives

  • Mutual exclusion locks
  • Reentrant locks
  • Conditional variables
  • Semaphores
  • Events

Why would you need these?

  • Threads are updating shared data structures
  • Threads need to coordinate their actions in some manner (events).
  • You need to regain some programming sanity.
<<< O'Reilly OSCON 2000, Advanced Python Programming, Slide 73
July 17, 2000, beazley@cs.uchicago.edu
>>>