Openssl + a bunch of other refactorings

This commit is contained in:
Igor Katson 2021-06-28 20:40:13 +01:00
parent b4b22ea9a4
commit 34dd074310
15 changed files with 151 additions and 26 deletions

View file

@ -18,3 +18,10 @@ pub fn spawn<N: Display + 'static + Send>(
}
});
}
pub fn spawn_block_in_place<F: FnOnce() -> R, R>(f: F) -> R {
// Have this wrapper so that it's easy to switch to just f() when
// using tokio's single-threaded runtime. Single-threaded runtime is
// easier to read with time profilers.
tokio::task::block_in_place(f)
}