SignalSender

Delivers a wait signal to the node a wait started on.

Signals are an observation, not part of correctness: a lost one costs the waiter a timeout, never a fact. So a sender is best effort and must not hold up its caller (a subscription that has just handled an entry, or the node that executed a derived command): a sender that crosses the network queues and returns, and drops what it cannot deliver instead of retrying.

A signal is worth delivering until its wait's deadline and no longer: a sender gives a signal that long, so an origin that is slow to take it, under load, still ends its wait, and drops one whose wait is over.

Inheritors

Types

Link copied to clipboard

Functions

Link copied to clipboard
abstract suspend fun send(origin: Origin, signal: WaitSignal, deadline: Long)

Delivers signal to origin, while its wait lasts: until deadline, in epoch milliseconds.

Link copied to clipboard
open suspend fun sendAll(origin: Origin, signals: List<WaitSignal>, deadline: Long)

Delivers signals to origin together and in their order, while their wait lasts: results a wait must take in that order, such as the hop a duplicate reached before its commit, which ends its wait (#7324). A sender that crosses the network sends them in one request, so two requests cannot reorder them; by default, one after the other.