Crates.io | tasking |
lib.rs | tasking |
version | 0.3.1 |
created_at | 2025-08-31 16:45:37.128593+00 |
updated_at | 2025-09-08 08:36:42.509258+00 |
description | Simple tasking utility that automatically replaces tasks based on descriptors. |
homepage | |
repository | https://github.com/vilicvane/rust-tasking |
max_upload_size | |
id | 1818687 |
size | 47,867 |
Simple tasking utility that automatically replaces tasks based on descriptors.
Currently only tokio implementation.
Task
: update by descriptor, abort on drop.TaskHub
: update by a list of descriptors, using Task
internally.#[derive(PartialEq, Clone, Debug)]
struct TaskDescriptor {
data: String,
}
let task = Task::new(
"example",
|TaskDescriptor { data }, abort_receiver| async move {
println!("task data: {data}");
abort_receiver.await?;
Ok(())
},
Default::default(),
);
task
.update(TaskDescriptor {
data: "foo".to_owned(),
})
.await;
Checkout examples for usage.
MIT License.