marcel_os ::task ::simple_executor Struct SimpleExecutor Copy item path Source pub struct SimpleExecutor { }
Expand description A simple executor that manages a queue of tasks to run.
Creates a new SimpleExecutor
with an empty task queue.
§ Returns
A new SimpleExecutor
instance.
Spawns a new task and adds it to the task queue.
§ Arguments
task
- The task to be added to the queue.
Runs tasks from the task queue until the queue is empty.
The tasks are polled in the order they were added to the queue.
If a task is not ready to complete, it is placed back into the queue to be polled again later.
Returns the “default value” for a type.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
[From]<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.