Skip to main content

run_pager_loop

Function run_pager_loop 

Source
pub fn run_pager_loop<B: DataBuffer>(
    port: &Port,
    service: Arc<dyn BlockService>,
    blobs: &Blobs,
    buffer_factory: impl FnMut(u64, usize) -> B + Send + 'static,
)
Expand description

Runs a synchronous event loop that listens on port for pager page requests, resolves the requested blob using blobs, allocates a destination buffer using buffer_factory, and invokes Blob::read_range.

Notice that buffer management and page supply (such as calling zx::Pager::supply_pages or transmitting over vmo-fifo) are entirely delegated to the DataBuffer implementation returned by buffer_factory.