Lines Matching refs:meth
75 :meth:`~Thread.run` method is called.
84 :meth:`~Thread.run` method is called.
112 (:meth:`Lock.acquire`, :meth:`RLock.acquire`, :meth:`Condition.wait`, etc.).
161 callable object to the constructor, or by overriding the :meth:`~Thread.run`
164 :meth:`~Thread.__init__` and :meth:`~Thread.run` methods of this class.
167 thread's :meth:`~Thread.start` method. This invokes the :meth:`~Thread.run`
171 stops being alive when its :meth:`~Thread.run` method terminates -- either
172 normally, or by raising an unhandled exception. The :meth:`~Thread.is_alive`
175 Other threads can call a thread's :meth:`~Thread.join` method. This blocks
176 the calling thread until the thread whose :meth:`~Thread.join` method is
201 daemonic, and cannot be :meth:`~Thread.join`\ ed. They are never deleted,
214 *target* is the callable object to be invoked by the :meth:`run` method.
241 object's :meth:`~Thread.run` method to be invoked in a separate thread
251 You may override this method in a subclass. The standard :meth:`run`
259 the thread whose :meth:`~Thread.join` method is called terminates -- either
265 (or fractions thereof). As :meth:`~Thread.join` always returns ``None``,
266 you must call :meth:`~Thread.is_alive` after :meth:`~Thread.join` to
268 :meth:`~Thread.join` call timed out.
273 A thread can be :meth:`~Thread.join`\ ed many times.
275 :meth:`~Thread.join` raises a :exc:`RuntimeError` if an attempt is made
277 an error to :meth:`~Thread.join` a thread before it has been started
304 This method returns ``True`` just before the :meth:`~Thread.run` method
305 starts until just after the :meth:`~Thread.run` method terminates. The
311 or not (False). This must be set before :meth:`~Thread.start` is called,
349 in the unlocked state. It has two basic methods, :meth:`~Lock.acquire` and
350 :meth:`~Lock.release`. When the state is unlocked, :meth:`~Lock.acquire`
352 :meth:`~Lock.acquire` blocks until a call to :meth:`~Lock.release` in another
353 thread changes it to unlocked, then the :meth:`~Lock.acquire` call resets it
354 to locked and returns. The :meth:`~Lock.release` method should only be
361 When more than one thread is blocked in :meth:`~Lock.acquire` waiting for the
362 state to turn to unlocked, only one thread proceeds when a :meth:`~Lock.release`
433 To lock the lock, a thread calls its :meth:`~RLock.acquire` method; this
435 its :meth:`~Lock.release` method. :meth:`~Lock.acquire`/:meth:`~Lock.release`
436 call pairs may be nested; only the final :meth:`~Lock.release` (the
437 :meth:`~Lock.release` of the outermost pair) resets the lock to unlocked and
438 allows another thread blocked in :meth:`~Lock.acquire` to proceed.
510 the enclosed block. The :meth:`~Condition.acquire` and
511 :meth:`~Condition.release` methods also call the corresponding methods of
515 :meth:`~Condition.wait` method releases the lock, and then blocks until
516 another thread awakens it by calling :meth:`~Condition.notify` or
517 :meth:`~Condition.notify_all`. Once awakened, :meth:`~Condition.wait`
520 The :meth:`~Condition.notify` method wakes up one of the threads waiting for
521 the condition variable, if any are waiting. The :meth:`~Condition.notify_all`
524 Note: the :meth:`~Condition.notify` and :meth:`~Condition.notify_all` methods
526 not return from their :meth:`~Condition.wait` call immediately, but only when
527 the thread that called :meth:`~Condition.notify` or :meth:`~Condition.notify_all`
532 particular change of state call :meth:`~Condition.wait` repeatedly until they
534 :meth:`~Condition.notify` or :meth:`~Condition.notify_all` when they change
551 because :meth:`~Condition.wait` can return after an arbitrary long time,
552 and the condition which prompted the :meth:`~Condition.notify` call may
554 :meth:`~Condition.wait_for` method can be used to automate the condition
562 To choose between :meth:`~Condition.notify` and :meth:`~Condition.notify_all`,
597 awakened by a :meth:`notify` or :meth:`notify_all` call for the same
606 its :meth:`release` method, since this may not actually unlock the lock
625 This utility method may call :meth:`wait` repeatedly until the predicate
636 Therefore, the same rules apply as with :meth:`wait`: The lock must be
656 Note: an awakened thread does not actually return from its :meth:`wait`
657 call until it can reacquire the lock. Since :meth:`notify` does not
663 :meth:`notify`, but wakes up all waiting threads instead of one. If the
675 used the names ``P()`` and ``V()`` instead of :meth:`~Semaphore.acquire` and
676 :meth:`~Semaphore.release`).
679 :meth:`~Semaphore.acquire` call and incremented by each :meth:`~Semaphore.release`
680 call. The counter can never go below zero; when :meth:`~Semaphore.acquire`
682 :meth:`~Semaphore.release`.
690 counter representing the number of :meth:`release` calls minus the number of
691 :meth:`acquire` calls, plus an initial value. The :meth:`acquire` method
711 :meth:`~Semaphore.release`. Once awoken (and the counter is greater
713 thread will be awoken by each call to :meth:`~Semaphore.release`. The
783 :meth:`~Event.set` method and reset to false with the :meth:`~Event.clear`
784 method. The :meth:`~Event.wait` method blocks until the flag is true.
790 true with the :meth:`~Event.set` method and reset to false with the
791 :meth:`clear` method. The :meth:`wait` method blocks until the flag is true.
804 are awakened. Threads that call :meth:`wait` once the flag is true will
810 :meth:`wait` will block until :meth:`.set` is called to set the internal
817 :meth:`.set` to set the flag to true, or until the optional timeout occurs.
841 Timers are started, as with threads, by calling their :meth:`~Timer.start`
843 :meth:`~Timer.cancel` method. The interval the timer will wait before
879 the barrier by calling the :meth:`~Barrier.wait` method and will block until
880 all of the threads have made their :meth:`~Barrier.wait` calls. At this point,
908 the :meth:`wait` method.
947 calls to :meth:`wait` to fail with the :class:`BrokenBarrierError`. Use
979 All of the objects provided by this module that have :meth:`acquire` and
980 :meth:`release` methods can be used as context managers for a :keyword:`with`
981 statement. The :meth:`acquire` method will be called when the block is
982 entered, and :meth:`release` will be called when the block is exited. Hence,