| Crates.io | nio-task |
| lib.rs | nio-task |
| version | 0.1.0 |
| created_at | 2025-12-27 03:55:00.944387+00 |
| updated_at | 2026-01-21 13:55:25.340973+00 |
| description | async task implementation |
| homepage | |
| repository | https://github.com/nurmohammed840/nio |
| max_upload_size | |
| id | 2006657 |
| size | 132,170 |
Nio Task is a low-level task abstraction designed for building executors. It gives you explicit control over how and when a task is polled and rescheduled.
Add this to your Cargo.toml file:
[dependencies]
nio-task = "0.1"
use nio_task::{Status, Task};
let metadata = 0;
let future = async {};
let scheduler = |task| {
// ...
};
let (task, join) = Task::new_with(metadata, future, scheduler);
match task.poll() {
Status::Yielded(task) => task.schedule(),
Status::Pending => {}
Status::Complete(_metadata) => {}
}