Skip to main content

Crate scope_spawn

Crate scope_spawn 

Source
Expand description

A Small utility library which aims to make structured concurrency a bit easier when used with tokio or tower.

A Simple Example

use scope_spawn::scope::Scope;

#[tokio::main]
async fn main() {
    let scope = Scope::new();
    scope.spawn(async {
    println!("Hello from a spawned task!");
});
// scope is dropped here, and spawned tasks are cancelled.
}

Modulesยง

scope
Implementation of Scope