when2task-0.2.0 has been yanked.
when2task
A lightweight, dependency-aware task execution library for Rust that allows you to define tasks with dependencies and execute them in the correct order.
Features
- Dependency Management: Define tasks with dependencies on other tasks
- Automatic Scheduling: Tasks are automatically executed in dependency order
- Concurrent Execution: Independent tasks run concurrently within each execution step
- Flexible Execution Modes: Choose between true async or pseudo async execution
- Type Safety: Full generic support for task results and errors
Example
use ;
use ;
async
Core Concepts
- Task: A unit of work represented as a future that returns
Result<T, E> - Dependency: Specifies which tasks must complete before a task can run
- TaskExecutor: Manages and executes tasks in dependency order
- ExecutionMode: Determines how tasks are scheduled (direct execution vs spawned)
- ExecutionResult: Contains the results of all executed tasks organized by execution steps
License
This project is licensed under the MIT License - see the LICENSE file for details.