Mbed OS Reference
|
Public Member Functions | |
OperationListBase () | |
Create a new empty operation list. More... | |
~OperationListBase () | |
Destroy this object and abort all operations. More... | |
bool | empty () |
Check if the list is empty. More... | |
void | add (AsyncOp *op) |
Add an operation to the list. More... | |
void | remove (AsyncOp *op) |
Remove an operation from the list. More... | |
AsyncOp * | dequeue_raw () |
Dequeue the head of the list. More... | |
void | remove_all () |
Abort all operations. More... | |
void | process () |
Process the operation list. More... | |
Definition at line 30 of file OperationListBase.h.
Create a new empty operation list.
~OperationListBase | ( | ) |
Destroy this object and abort all operations.
bool empty | ( | ) |
Check if the list is empty.
void add | ( | AsyncOp * | op | ) |
Add an operation to the list.
If the list was empty then call process on this operation
op | Operation to add |
void remove | ( | AsyncOp * | op | ) |
Remove an operation from the list.
If this was the head of the list then process the next element in the list.
op | Operation to remove |
AsyncOp * dequeue_raw | ( | ) |
Dequeue the head of the list.
Remove the head of the operation list without completing it or processing the next element. The caller must call the AsnycOp::complete() function of the returned object. Additionally process() must be called on this object if there are still elements in the list.
void remove_all | ( | ) |
Abort all operations.
void process | ( | ) |
Process the operation list.
This allow the operation at the head of the list to perform processing