pub struct MailCarrier;Expand description
The mailbox’s own delivery (D140): every message filed with a wake (by a filer that does not wait, such as a board’s
dispatcher, or by a send to a hooked session) is handed to its session by the session’s own door, by the daemon that
runs this watch loop. Mail for another machine is carried there through Teams (supercode teams mail), the only
cross-machine leg, and filed with the same wake, so that machine’s watch loop delivers it. A failed attempt waits
[FIRST_RETRY] doubling to [LAST_RETRY], kept in the wake itself, so a restarted watcher waits as the last one
did. A wake expires only once it has failed WAKE_ATTEMPTS counted times and its first counted failure is older
than its bound (LOCAL_WAKE_LIFETIME here, REMOTE_WAKE_LIFETIME for another machine): the message stays filed
and unread, and the expiry is recorded in its mailbox (supercode message expired), which the board’s diagnostics
read. Mail for a machine that is offline is not failing: the machine is probed once per [LAST_RETRY] (one Teams
call for all of its mail, the wait kept once per machine), all of its mail is carried when it answers, and the mail
expires only past OFFLINE_CEILING.
Implementations§
Source§impl MailCarrier
impl MailCarrier
Sourcepub async fn tick(&mut self, homes: &HarnessHomes)
pub async fn tick(&mut self, homes: &HarnessHomes)
One pass over every mailbox holding a wake that is due. Mail for another machine is taken a machine at a time:
a machine that answered offline is probed once per [LAST_RETRY] (with its oldest message), and when it
answers, all of its waiting mail is carried in that pass.