pub(crate) async fn scan<T: Send + 'static>(
f: impl FnOnce() -> T + Send + 'static,
) -> Result<T, JoinError>Expand description
Run a search on the blocking pool, holding a permit for as long as it takes.
spawn_blocking is not optional here: reads are mmap reads, and a cold page
fault stalls the OS thread with no yield point, taking every other connection
that tokio worker owns down with it.