Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ taski Public

async DAG task scheduling in Rust (WIP)

License

romnn/taski

Repository files navigation

taski

build status test status dependency status crates.io docs.rs

cargo add taski

Design decisions

  • task node is internal, because this is where the state is kept (interior mutability) and where the unique index is assigned to
    • construction from the user not possible
    • only possible to creatge using add_task
    • only valid input as dependency (we know it was added (otherwise we do)) and we know it cannot have circles
    • user cannot run any methods on it? wrong because of task trait
  • use a result type, to allow for fail fast strategies
    • user workaround: use infallible and propagate an Option
  • clone outputs as inputs, this is more efficient for small data such as i32
    • for large data (or data that cannot be cloned), just return an Arc

Development

cargo install cargo-expand
cargo expand ::task

There exist many different task scheduler implementations, the goals of this implementation are as follows:

  • support async tasks
  • support directed acyclic graphs with cycle detection
  • allow custom scheduling policies based on a custom ID type, which could enforce complex constraints by using labels
  • allow concurrent adding of tasks while the scheduler is executing, so that tasks can be streamed into the scheduler

About

async DAG task scheduling in Rust (WIP)

Topics

Resources

License

Stars

Watchers

Forks

Languages