On this page
  1. threading.Event
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

threading.Event

Prev: threading.enumerate | Up: threading | Next: threading.excepthook
Rel: threading.active_count, threading.Barrier, threading.BoundedSemaphore, threading.BrokenBarrierError
Ref: docs.python.org — threading.Event
Tags: #public #python3 #stdlib #threading


Import

import threading
from threading import Event

Signature & Overview

threading.Event()

Class implementing event objects.

Methods & Attributes

Usage

import threading

ready = threading.Event()

def setup() -> None:
    ready.set()

t = threading.Thread(target=setup)
t.start()
assert ready.wait(timeout=2) is True
t.join()

Gotchas

REPL Inspect

from threading import Event
help(Event)

Linked from

Related notes