Module thread :: Class LockType
[hide private]
[frames] | no frames]

type LockType

object --+

A lock object is a synchronization primitive. To create a lock, call the PyThread_allocate_lock() function. Methods are:

acquire() -- lock the lock, possibly blocking until it can be obtained release() -- unlock of the lock locked() -- test whether the lock is currently locked

A lock is not owned by the thread that locked it; another thread may unlock it. A thread attempting to lock a lock that it has already locked will block until another thread unlocks it. Deadlocks may ensue.