Struct freertos_rs::ComputeTask [] [src]

pub struct ComputeTask<R> { /* fields omitted */ }

A task that can terminate and return its return value. Implemented using an atomically shared mutex.

Sample usage:

let task = Task::new().compute(|| {

let result = task.into_result(Duration::ms(1000)).unwrap();


impl<R: Debug> ComputeTask<R>

Get the handle of the task that computes the result.

Wait until the task computes its result. Otherwise, returns a timeout.

Consume the task and unwrap the computed return value.