Skip to main content

dispatch_answering

Function dispatch_answering 

Source
fn dispatch_answering(
    state: &TransportState,
    command: Command,
    to: u64,
    reply_tx: &UnboundedSender<Answer>,
)
Expand description

Dispatch one reply-carrying command and hand its answer to the connection.

The caller does not wait for the answer. The dispatch stays here, where its order against the commands around it is unchanged; the wait and the reply move to a task of their own and come back through reply_tx. A despawn’s reply arrives only when its detached cleanup finishes (seconds to minutes), and a read loop awaiting it reads nothing behind it (#2445).