English | 简体中文
Task Executor A task executor based on tokio or async-std, this executor can control the number of concurrently executed tasks, and the same type of tasks can be forced to be executed sequentially.
rust
use task_executor::Builder;
fn main() {
let exec = Builder::default().workers(100).queue_max(100_000).build();
let runner = async move{
let replay = exec.call(async {
"hello world!"
}).await;
println!("{:?}", replay.unwrap_or_default());
};
async_std::task::block_on(runner);
}