Lines Matching refs:meth
121 :meth:`~Thread.run` method is called.
130 :meth:`~Thread.run` method is called.
158 (:meth:`Lock.acquire`, :meth:`RLock.acquire`, :meth:`Condition.wait`, etc.).
207 callable object to the constructor, or by overriding the :meth:`~Thread.run`
210 :meth:`~Thread.__init__` and :meth:`~Thread.run` methods of this class.
213 thread's :meth:`~Thread.start` method. This invokes the :meth:`~Thread.run`
217 stops being alive when its :meth:`~Thread.run` method terminates -- either
218 normally, or by raising an unhandled exception. The :meth:`~Thread.is_alive`
221 Other threads can call a thread's :meth:`~Thread.join` method. This blocks
222 the calling thread until the thread whose :meth:`~Thread.join` method is
228 If the :meth:`~Thread.run` method raises an exception,
251 daemonic, and cannot be :meth:`~Thread.join`\ ed. They are never deleted,
264 *target* is the callable object to be invoked by the :meth:`run` method.
291 object's :meth:`~Thread.run` method to be invoked in a separate thread
301 You may override this method in a subclass. The standard :meth:`run`
309 the thread whose :meth:`~Thread.join` method is called terminates -- either
315 (or fractions thereof). As :meth:`~Thread.join` always returns ``None``,
316 you must call :meth:`~Thread.is_alive` after :meth:`~Thread.join` to
318 :meth:`~Thread.join` call timed out.
323 A thread can be :meth:`~Thread.join`\ ed many times.
325 :meth:`~Thread.join` raises a :exc:`RuntimeError` if an attempt is made
327 an error to :meth:`~Thread.join` a thread before it has been started
374 This method returns ``True`` just before the :meth:`~Thread.run` method
375 starts until just after the :meth:`~Thread.run` method terminates. The
381 or not (False). This must be set before :meth:`~Thread.start` is called,
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`
423 :meth:`~Lock.acquire` blocks until a call to :meth:`~Lock.release` in another
424 thread changes it to unlocked, then the :meth:`~Lock.acquire` call resets it
425 to locked and returns. The :meth:`~Lock.release` method should only be
432 When more than one thread is blocked in :meth:`~Lock.acquire` waiting for the
433 state to turn to unlocked, only one thread proceeds when a :meth:`~Lock.release`
509 To lock the lock, a thread calls its :meth:`~RLock.acquire` method; this
511 its :meth:`~Lock.release` method. :meth:`~Lock.acquire`/:meth:`~Lock.release`
512 call pairs may be nested; only the final :meth:`~Lock.release` (the
513 :meth:`~Lock.release` of the outermost pair) resets the lock to unlocked and
514 allows another thread blocked in :meth:`~Lock.acquire` to proceed.
586 the enclosed block. The :meth:`~Condition.acquire` and
587 :meth:`~Condition.release` methods also call the corresponding methods of
591 :meth:`~Condition.wait` method releases the lock, and then blocks until
592 another thread awakens it by calling :meth:`~Condition.notify` or
593 :meth:`~Condition.notify_all`. Once awakened, :meth:`~Condition.wait`
596 The :meth:`~Condition.notify` method wakes up one of the threads waiting for
597 the condition variable, if any are waiting. The :meth:`~Condition.notify_all`
600 Note: the :meth:`~Condition.notify` and :meth:`~Condition.notify_all` methods
602 not return from their :meth:`~Condition.wait` call immediately, but only when
603 the thread that called :meth:`~Condition.notify` or :meth:`~Condition.notify_all`
608 particular change of state call :meth:`~Condition.wait` repeatedly until they
610 :meth:`~Condition.notify` or :meth:`~Condition.notify_all` when they change
627 because :meth:`~Condition.wait` can return after an arbitrary long time,
628 and the condition which prompted the :meth:`~Condition.notify` call may
630 :meth:`~Condition.wait_for` method can be used to automate the condition
638 To choose between :meth:`~Condition.notify` and :meth:`~Condition.notify_all`,
673 awakened by a :meth:`notify` or :meth:`notify_all` call for the same
682 its :meth:`release` method, since this may not actually unlock the lock
701 This utility method may call :meth:`wait` repeatedly until the predicate
712 Therefore, the same rules apply as with :meth:`wait`: The lock must be
732 Note: an awakened thread does not actually return from its :meth:`wait`
733 call until it can reacquire the lock. Since :meth:`notify` does not
739 :meth:`notify`, but wakes up all waiting threads instead of one. If the
751 used the names ``P()`` and ``V()`` instead of :meth:`~Semaphore.acquire` and
752 :meth:`~Semaphore.release`).
755 :meth:`~Semaphore.acquire` call and incremented by each :meth:`~Semaphore.release`
756 call. The counter can never go below zero; when :meth:`~Semaphore.acquire`
758 :meth:`~Semaphore.release`.
766 counter representing the number of :meth:`release` calls minus the number of
767 :meth:`acquire` calls, plus an initial value. The :meth:`acquire` method
787 :meth:`~Semaphore.release`. Once awoken (and the counter is greater
789 thread will be awoken by each call to :meth:`~Semaphore.release`. The
862 :meth:`~Event.set` method and reset to false with the :meth:`~Event.clear`
863 method. The :meth:`~Event.wait` method blocks until the flag is true.
869 true with the :meth:`~Event.set` method and reset to false with the
870 :meth:`clear` method. The :meth:`wait` method blocks until the flag is true.
883 are awakened. Threads that call :meth:`wait` once the flag is true will
889 :meth:`wait` will block until :meth:`.set` is called to set the internal
896 :meth:`.set` to set the flag to true, or until the optional timeout occurs.
920 Timers are started, as with threads, by calling their :meth:`~Timer.start`
922 :meth:`~Timer.cancel` method. The interval the timer will wait before
958 the barrier by calling the :meth:`~Barrier.wait` method and will block until
959 all of the threads have made their :meth:`~Barrier.wait` calls. At this point,
987 the :meth:`wait` method.
1026 calls to :meth:`wait` to fail with the :class:`BrokenBarrierError`. Use
1058 All of the objects provided by this module that have :meth:`acquire` and
1059 :meth:`release` methods can be used as context managers for a :keyword:`with`
1060 statement. The :meth:`acquire` method will be called when the block is
1061 entered, and :meth:`release` will be called when the block is exited. Hence,