nio-task

Crates.ionio-task
lib.rsnio-task
version0.1.0
created_at2025-12-27 03:55:00.944387+00
updated_at2026-01-21 13:55:25.340973+00
descriptionasync task implementation
homepage
repositoryhttps://github.com/nurmohammed840/nio
max_upload_size
id2006657
size132,170
Nur (nurmohammed840)

documentation

README

Nio Task

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.

Crates.io Documentation License: Apache-2.0

Example

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) => {}
}
Commit count: 166

cargo fmt