Module maitake::task

source ·
Expand description

The maitake task system.

This module contains the code that spawns tasks on a scheduler, and manages the lifecycle of tasks once they are spawned. This includes the in-memory representation of spawned tasks (the Task type), and the handle used by the scheduler and other components of the runtime to reference a task once it is spawned (the TaskRef type).

Modules

builder 🔒
id 🔒
state 🔒
storage 🔒

Macros

Structs

A type representing Box storage of a task
Builds a new Task prior to spawning it.
The context of an asynchronous task.
Header 🔒
The task’s header.
Errors returned by awaiting a JoinHandle.
An owned permission to join a task (await its termination).
The task’s Header and scheduler reference.
Stub 🔒
A task.
A unique identifier for a running task.
A type-erased, reference-counted pointer to a spawned Task.
Vtable 🔒
A virtual function pointer table (vtable) that specifies the behavior of a Task instance.
A Waker is a handle for waking up a task by notifying its executor that it is ready to be run.

Enums

Cell 🔒
The core of a task: either the Future that was spawned, if the task has not yet completed, or the Output of the future, once the future has completed.
Indicates whether a value is available or if the current task has been scheduled to receive a wakeup instead.
PollResult 🔒

Traits

A trait representing a heap allocation that can own a Task.

Functions