(task: impl FnOnce() -> R + Send + 'static)
| 49 | } |
| 50 | |
| 51 | pub fn launch_blocking_task<R: Send + 'static>(task: impl FnOnce() -> R + Send + 'static) -> JoinHandle<R> { |
| 52 | TOKIO_RUNTIME.spawn_blocking(task) |
| 53 | } |
| 54 | |
| 55 | pub fn block_on<R>(task: impl Future<Output = R>) -> R { |
| 56 | TOKIO_RUNTIME.block_on(task) |