Skip to main content

Module task

Module task 

Source

Structs§

GlobalTasks
Tasks owned by the event loop rather than a window runner.
OwnedTaskHandle
An owning handle that cancels its task when the last clone is dropped. Created with TaskHandle::owned.
Task
A component or window task scheduled by the runner.
TaskHandle
A non-owning task handle whose drop does not cancel the task. Use TaskHandle::owned for cancellation on drop.
TaskId
The opaque identifier of a task scheduled by Freya’s async runtime.
TaskWaker
Wakes a Freya task by asking the runner to poll it again.

Functions§

spawn
Spawn a task cancelled when its current component unmounts. The returned TaskHandle can cancel it earlier.
spawn_global
Spawn an event-loop task with global context that survives window closure. It has no component context and must not retain window-owned state.
spawn_in_scope
Spawn a task attached to the given scope, or to the current one when passing None.
spawn_in_window
Spawn a task that survives its component but is cancelled when its window closes.