You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes the queue for future push events and also closes all child queues.
133
+
134
+
Once closed, no new events can be enqueued. For Python 3.13+, this will trigger
135
+
`asyncio.QueueShutDown` when the queue is empty and a consumer tries to dequeue.
136
+
For lower versions, the queue will be marked as closed and optionally cleared.
137
+
138
+
Args:
139
+
immediate (bool):
140
+
- True: Immediately closes the queue and clears all unprocessed events without waiting for them to be consumed. This is suitable for scenarios where you need to forcefully interrupt and quickly release resources.
141
+
- False (default): Gracefully closes the queue, waiting for all queued events to be processed (i.e., the queue is drained) before closing. This is suitable when you want to ensure all events are handled.
132
142
133
-
Once closed, `dequeue_event` will eventually raise `asyncio.QueueShutDown`
134
-
when the queue is empty. Also closes all child queues.
0 commit comments