Function timely::communication::allocator::zero_copy::tcp::recv_loop

source ·
pub fn recv_loop<S>(
    reader: S,
    targets: Vec<Receiver<MergeQueue>>,
    worker_offset: usize,
    process: usize,
    remote: usize,
    logger: Option<Logger<CommunicationEvent, CommunicationSetup>>
)
where S: Stream,
Expand description

Repeatedly reads from a TcpStream and carves out messages.

The intended communication pattern is a sequence of (header, message)^* for valid messages, followed by a header for a zero length message indicating the end of stream.

If the stream ends without being shut down, or if reading from the stream fails, the receive thread panics with a message that starts with “timely communication error:” in an attempt to take down the computation and cause the failures to cascade.