Skip to main content

spawn_read

Function spawn_read 

Source
fn spawn_read(
    answer: ReadAnswerGuard,
    encode: impl Future<Output = Result<(Value, OpenTimings)>> + Send + 'static,
) -> AbortOnDrop
Expand description

Spawn a subscribe read off the connection’s loop, with its answer guard armed INSIDE the task: an encode that panics must still answer the loop, or its read stays in flight for the connection’s life and every later subscribe queues behind it in silence.