pub fn task_sync<T: Send, F: Future<Output = T> + Send>(future: F) -> TExpand description
Trampoline function for calling the async api in a sync way.
This convoluted mess was implemented because doing oneshot::spawn directly on the async api functions resulted in a memory leak in tokio_threadpool. Spawning the future indirectly appears to work without memory leak.