Push a notification onto the global queue. Mirrors TS ``enqueuePendingNotification``. Idempotency is the caller's responsibility — chapter-10 / WI-3.2's ``notified`` check-and-set is what guards against duplicate XML; this queue is a dumb FIFO.
(*, value: str, mode: NotificationMode = "task-notification")
| 42 | |
| 43 | |
| 44 | def enqueue_pending_notification(*, value: str, mode: NotificationMode = "task-notification") -> None: |
| 45 | """Push a notification onto the global queue. |
| 46 | |
| 47 | Mirrors TS ``enqueuePendingNotification``. Idempotency is the |
| 48 | caller's responsibility — chapter-10 / WI-3.2's ``notified`` |
| 49 | check-and-set is what guards against duplicate XML; this queue |
| 50 | is a dumb FIFO. |
| 51 | """ |
| 52 | with _lock: |
| 53 | _queue.append(PendingNotification(value=value, mode=mode)) |
| 54 | |
| 55 | |
| 56 | def drain_pending_notifications( |
no test coverage detected