pub async fn blocking<R: Send + 'static>(
work: impl FnOnce() -> Result<R, Error> + Send + 'static,
) -> Result<R, Error>Expand description
Run work on the blocking pool. Anything that may call a script goes
through here: a hook can wait on the network or a child process, and that
wait must not stall the async runtime’s worker threads.
The request’s actor goes with the work, so a change made on the blocking pool is logged as the caller’s.