Lines Matching refs:threads
59 """Set a profile function for all threads started from the threading module.
73 """Set a trace function for all threads started from the threading module.
180 by any thread), and if any other threads are blocked waiting for the
227 A condition variable allows one or more threads to wait until they are
360 """Wake up one or more threads waiting on this condition, if any.
365 This method wakes up at most n of the threads waiting for the condition
366 variable; it is a no-op if no threads are waiting.
390 """Wake up all threads waiting on this condition.
399 """Wake up all threads waiting on this condition.
442 which blocked threads are awakened should not be relied on. There is no
586 All threads waiting for it to become true are awakened. Threads
597 Subsequently, threads calling wait() will block until set() is called to
635 # similar to 'draining' except that threads leave with a BrokenBarrierError,
636 # and a 'broken' state in which all threads get the exception.
640 Useful for synchronizing a fixed number of threads at known synchronization
647 """Create a barrier, initialised to 'parties' threads.
650 the threads after they have all entered the barrier and just prior to
672 When the specified number of threads have started waiting, they are all
674 of the threads will have executed that callback prior to returning.
694 # Wake up any threads waiting for barrier to drain.
708 # Optionally run the 'action' and release the threads waiting
733 # If we are the last thread to exit the barrier, signal any threads
745 Any threads currently waiting will get the BrokenBarrier exception
752 #reset the barrier, waking up threads
765 Useful in case of error. Any currently waiting threads and threads
780 """Return the number of threads required to trip the barrier."""
785 """Return the number of threads currently waiting at the barrier."""
816 # Set of Thread._tstate_lock locks of non-daemon threads used by _shutdown()
824 Drop any shutdown locks that don't correspond to running threads anymore.
836 # Main class for threads
952 raise RuntimeError("threads can only be started once")
992 # reported. Also, we only suppress them for daemonic threads;
1051 # and .is_alive(). Any number of threads _may_ call ._stop()
1052 # simultaneously (for example, if multiple threads are blocked in
1072 "Remove current thread from the dict of currently running threads."
1149 It has no semantics. Multiple threads may be given the same name. The
1205 main thread is not a daemon thread and therefore all threads created in
1208 The entire Python program exits when only daemon threads are left.
1320 # Python shutdown. It is mostly needed for daemon threads.
1413 # Dummy thread class to represent threads not started here.
1418 # They are marked as daemon threads so we won't wait for them
1497 The list includes daemonic threads, dummy thread objects created by
1498 current_thread(), and the main thread. It excludes terminated threads and
1499 threads that have not yet been started.
1510 """CPython internal: register *func* to be called before joining threads.
1513 non-daemon threads are joined in `_shutdown()`. It provides a similar
1536 Wait until the Python thread state of all non-daemon threads get deleted.
1538 # Obscure: other threads may be waiting to join _main_thread. That's
1542 # isn't enough: other threads may already be waiting on _tstate_lock.
1550 # Call registered threading atexit functions before threads are joined.
1568 # In this case, ignore _main_thread, similar behavior than for threads
1572 # Join all non-deamon threads
1586 # new threads can be spawned while we were waiting for the other
1587 # threads to complete
1630 # reset _shutdown() locks: threads re-register their _tstate_lock below
1637 threads = set(_enumerate())
1638 threads.update(_dangling)
1639 for thread in threads: