• Home
  • Raw
  • Download

Lines Matching refs:unlocked

409 A primitive lock is in one of two states, "locked" or "unlocked". It is created
410 in the unlocked state. It has two basic methods, :meth:`acquire` and
411 :meth:`release`. When the state is unlocked, :meth:`acquire` changes the state
413 blocks until a call to :meth:`release` in another thread changes it to unlocked,
416 state to unlocked and returns immediately. If an attempt is made to release an
417 unlocked lock, a :exc:`ThreadError` will be raised.
420 turn to unlocked, only one thread proceeds when a :meth:`release` call resets
421 the state to unlocked; which one of the waiting threads proceeds is not defined,
432 block until the lock is unlocked, then set it to locked and return ``True``.
443 When the lock is locked, reset it to unlocked, and return. If any other threads
444 are blocked waiting for the lock to become unlocked, allow exactly one of them
447 When invoked on an unlocked lock, a :exc:`ThreadError` is raised.
459 and "recursion level" in addition to the locked/unlocked state used by primitive
460 locks. In the locked state, some thread owns the lock; in the unlocked state,
467 pair) resets the lock to unlocked and allows another thread blocked in
477 thread owns the lock, block until the lock is unlocked. Once the lock is
478 unlocked (not owned by any thread), then grab ownership, set the recursion level
480 is unlocked, only one at a time will be able to grab ownership of the lock.
494 zero, reset the lock to unlocked (not owned by any thread), and if any other
495 threads are blocked waiting for the lock to become unlocked, allow exactly one
501 unlocked.