Module task

Source
Expand description

This module provides a simple wrapper around the tokio::task module.

Structs§

JoinHandle
An owned permission to join on a task (await its termination).

Functions§

spawn
Spawns a new asynchronous task, returning a JoinHandle for it.
spawn_blocking
Runs the provided closure on a thread where blocking is acceptable.
spawn_local
Spawns a !Send future on the current LocalSet or LocalRuntime.