On this page
threading.BrokenBarrierError
Prev: threading.BoundedSemaphore | Up: threading | Next: threading.Condition
Rel: threading.active_count, threading.Barrier, threading.BoundedSemaphore, threading.Condition
Ref: docs.python.org โ threading.BrokenBarrierError
Tags: #public #python3 #stdlib #threading
Import
import threading
from threading import BrokenBarrierError
Signature & Overview
threading.BrokenBarrierError(...)
threading.BrokenBarrierError class.
Methods & Attributes
BrokenBarrierError.add_note(self, note, /)โ Add a note to the exceptionBrokenBarrierError.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import threading
b = threading.Barrier(2)
b.abort()
try:
b.wait()
except threading.BrokenBarrierError:
assert b.broken is True
Gotchas
- Subclass of
RuntimeError: Raised when a barrier is aborted, reset while threads are waiting, or times out.
REPL Inspect
from threading import BrokenBarrierError
help(BrokenBarrierError)
Linked from
- tuts/python3/stdlib_module/threading
- tuts/python3/stdlib_module/threading/active_count
- tuts/python3/stdlib_module/threading/Barrier
- tuts/python3/stdlib_module/threading/BoundedSemaphore
- tuts/python3/stdlib_module/threading/Condition
- tuts/python3/stdlib_module/threading/current_thread
- tuts/python3/stdlib_module/threading/enumerate
- tuts/python3/stdlib_module/threading/Event
- tuts/python3/stdlib_module/threading/excepthook
- tuts/python3/stdlib_module/threading/ExceptHookArgs
- tuts/python3/stdlib_module/threading/get_ident
- tuts/python3/stdlib_module/threading/get_native_id
- tuts/python3/stdlib_module/threading/getprofile
- tuts/python3/stdlib_module/threading/gettrace
- tuts/python3/stdlib_module/threading/local
- tuts/python3/stdlib_module/threading/Lock
- tuts/python3/stdlib_module/threading/main_thread
- tuts/python3/stdlib_module/threading/RLock
- tuts/python3/stdlib_module/threading/Semaphore
- tuts/python3/stdlib_module/threading/setprofile
- tuts/python3/stdlib_module/threading/setprofile_all_threads
- tuts/python3/stdlib_module/threading/settrace
- tuts/python3/stdlib_module/threading/settrace_all_threads
- tuts/python3/stdlib_module/threading/stack_size
- tuts/python3/stdlib_module/threading/Thread
- tuts/python3/stdlib_module/threading/ThreadError
- tuts/python3/stdlib_module/threading/Timer
Related notes
- tuts/python3/stdlib_module/threading/active_count Linked here; links to this page; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/Barrier Linked here; links to this page; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/BoundedSemaphore Linked here; links to this page; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/Condition Linked here; links to this page; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/threading/current_thread links to this page; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/enumerate links to this page; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/Event links to this page; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/excepthook links to this page; shared tags: #stdlib, #threading
- tuts/python3/stdlib_module/threading/ExceptHookArgs links to this page; shared tags: #stdlib, #threading