Crate tasky

source ·
Expand description

Fluent async task experiments

Read more about it in the “postfix spawn” post. This is an experiment moving tasks from a model where “tasks are async threads” to a model where: “tasks are parallel futures”.

This means tasks will no longer start unless explicitly .awaited, dangling tasks become a thing of the past, and by default async Rust will act structurally concurrent.

§Examples

use tasky::prelude::*;

async_std::task::block_on(async {
    let res = async { "nori is a horse" }
        .spawn()
        .name("meow".into())
        .await;
    assert_eq!(res, "nori is a horse");
})

Modules§

Structs§

  • Task builder that configures the settings of a new task.
  • A handle representing a task.

Traits§