Module runtime
Source - select
- Wait on multiple concurrent branches, returning when the first branch
completes, cancelling the remaining branches.
- BlockingThreadPool 🔒
- A blocking thread pool for Monoio, implemented using
blocking
crate
- new_runtime
- Creates a new asynchronous runtime using Monoio
- sleep
- Waits until
duration
has elapsed. - spawn
- Spawn a future in an asynchronous runtime
- spawn_blocking
spawn_blocking
is used for executing a task(without async) with heavy computation or blocking
io.- timeout
- Require a
Future
to complete before the specified duration has elapsed.