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::ThreadPoolthat 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_blockingwithout 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_blockingis used for executing a task(without async) with heavy computation or blocking io.