This commit is contained in:
Antonio Scandurra 2023-10-21 18:21:14 +02:00
parent b7d30fca2b
commit aa3fb28f81
9 changed files with 161 additions and 42 deletions

View file

@ -128,6 +128,11 @@ impl Executor {
Task::Spawned(task)
}
pub fn block<R>(&self, future: impl Future<Output = R>) -> R {
// todo!("integrate with deterministic dispatcher")
futures::executor::block_on(future)
}
pub fn is_main_thread(&self) -> bool {
self.dispatcher.is_main_thread()
}