Skip to main content

Module tasks

Module tasks 

Source
Expand description

Cooperative task stop with a monotonic deadline, using only the public task manager API (relationships, signals and sleep).

Tasks receive [Signal::Termination] and must finish by themselves. Embassy cannot preempt or kill a task, so an unresponsive task is reported as Error::Timeout and keeps every resource it references: nothing is deallocated underneath it.

Constants§

POLL_INTERVAL
Interval between liveness checks while waiting for tasks to finish.

Functions§

stop
Ask every descendant of root to terminate, except the subtrees rooted at keep (runtime services stopped by the driver stage), and wait until they are gone or budget elapsed on the monotonic clock now.
termination_requested
Whether the current task was asked to terminate or interrupt.