[−][src]Function pasts::block_on
pub fn block_on<F: Future<Output = ()> + 'static>(f: F)
Execute a future on the current thread.
Upon completion of the future, the program will exit. This allows for some
optimizations and simplification of code (as well as behavioral consistency
on Web Assembly. You may call block_on()
on multiple threads to build an
asynchronous thread pool.