Function tsukuyomi::server::blocking::blocking [−][src]
pub fn blocking<R>(
f: impl FnOnce() -> R
) -> Poll<R, BlockingError>
Enter a blocking section of code if available.
This function is a wrapper of tokio_threadpool::blocking
.
If the current runtime is a current_thread, this function does not call the original
blocking API and immediately block the curren thread with the provided function.
See also the documentation of tokio_threadpool::blocking
.