task-executor 0.1.1

Task Executor A task executor based on tokio or async-std.
docs.rs failed to build task-executor-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: task-executor-0.3.3

Task Executor

GitHub Release

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.

Features

  • Execute the tasks;
  • Execute the tasks and return results;
  • Control the number of concurrently executed tasks;
  • Support task queue;
  • Tasks of the same type can be forced to be executed sequentially;

Examples

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);
}