Lines Matching refs:unlocked
419 A primitive lock is in one of two states, "locked" or "unlocked". It is created
420 in the unlocked state. It has two basic methods, :meth:`~Lock.acquire` and
421 :meth:`~Lock.release`. When the state is unlocked, :meth:`~Lock.acquire`
424 thread changes it to unlocked, then the :meth:`~Lock.acquire` call resets it
426 called in the locked state; it changes the state to unlocked and returns
427 immediately. If an attempt is made to release an unlocked lock, a
433 state to turn to unlocked, only one thread proceeds when a :meth:`~Lock.release`
434 call resets the state to unlocked; which one of the waiting threads proceeds
456 block until the lock is unlocked, then set it to locked and return ``True``.
484 When the lock is locked, reset it to unlocked, and return. If any other threads
485 are blocked waiting for the lock to become unlocked, allow exactly one of them
488 When invoked on an unlocked lock, a :exc:`RuntimeError` is raised.
505 and "recursion level" in addition to the locked/unlocked state used by primitive
506 locks. In the locked state, some thread owns the lock; in the unlocked state,
513 :meth:`~Lock.release` of the outermost pair) resets the lock to unlocked and
537 thread owns the lock, block until the lock is unlocked. Once the lock is
538 unlocked (not owned by any thread), then grab ownership, set the recursion level
540 is unlocked, only one at a time will be able to grab ownership of the lock.
562 zero, reset the lock to unlocked (not owned by any thread), and if any other
563 threads are blocked waiting for the lock to become unlocked, allow exactly one
569 unlocked.