run_paging_loop_shared

Function run_paging_loop_shared 

Source
pub fn run_paging_loop_shared<T: Read + Write, A: SlotArena, S: SwapStore>(
    stream: &mut T,
    res: &Mutex<Residency<A, S>>,
) -> Result<()>
Expand description

Shared variant of run_paging_loop: many connection threads drive ONE process-global residency, locking it per request. This is what makes the peer a SHARED warm cache — a snapshot PUT by one client is GET-able by another (same namespace). The lock is held only for the (fast) map op + any spill/fault byte move, never across a TCP read.