Expand description
Blocking tasks related.
Structs§
- Blocking
Task - BlockingTask is contrusted by monoio, ThreadPool impl
will execute it with
.run()
. - Default
Thread Pool - DefaultThreadPool is a simple wrapped
threadpool::ThreadPool
that implementmonoio::blocking::ThreadPool
. You may use this implementation, or you can use your own thread pool implementation.
Enums§
- Blocking
Strategy - BlockingStrategy can be set if there is no ThreadPool attached.
It controls how to handle
spawn_blocking
without thread pool. - Join
Error - Error on waiting blocking task.
Traits§
- Thread
Pool - Users may implement a ThreadPool and attach it to runtime. We also provide an implementation based on threadpool crate, you can use DefaultThreadPool.
Functions§
- spawn_
blocking spawn_blocking
is used for executing a task(without async) with heavy computation or blocking io.