forge
Clone
https://git.tahinli.com/Tahinli/forge.git
0 watching0 forksRustAGPL-3.07.1 MiB490f099Tahinli7 hours ago322 commits
| 1 | //! The change signal of the mail queue. Each change to the outbox (a message queued, a try's |
| 2 | //! outcome, a retry, a discard) bumps one counter, and every open queue page wakes on it through |
| 3 | //! its event stream. The counter carries no data: a subscriber reads the queue again when it |
| 4 | //! wakes. Nothing polls. The signal is process-wide, like the mail worker's waker. |
| 5 | |
| 6 | use OnceLock; |
| 7 | |
| 8 | use watch; |
| 9 | |
| 10 | static CHANGES: = new; |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | /// Subscribes to queue changes. Only a bump after this call wakes the receiver. |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | /// Counts one change of the queue. Nobody has to be listening. |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 |