Skip to main content

background_loop

Function background_loop 

Source
pub fn background_loop(
    receiver: UnboundedReceiver<SessionMessage>,
    session: Arc<Session>,
)
Expand description

The per-session request loop.

Receives requests from the session’s mpsc receiver and runs them serially against the session’s SessionState. Requests get their response through their reply sender, and jobs through the session’s jobs.

One instance runs per Session, on a thread spawned by Session::new. The loop terminates when the session is dropped or SessionMessage::Exit arrives.