A type-erased operation that can be executed via AnyExecutionContext.
More...
#include <AnyOperation.hpp>
template<typename RetType>
class util::async::AnyOperation< RetType >
A type-erased operation that can be executed via AnyExecutionContext.
◆ AnyOperation()
template<typename RetType >
Construct a new type-erased Operation object.
- Parameters
-
operation | The operation to wrap |
◆ abort()
template<typename RetType >
Abort the operation.
Used to cancel the timer for scheduled operations and request the operation to be stopped as soon as possible
◆ get()
template<typename RetType >
Get the result of the operation.
- Returns
- The result of the operation
◆ invoke()
template<typename RetType >
Force-invoke the operation.
- Note
- The action is scheduled on the underlying context/strand
- Warning
- The code of the user-provided action is expected to take care of thread-safety unless this operation is scheduled through a strand
◆ wait()
template<typename RetType >
Wait for the operation to complete.
- Note
- This will block the current thread until the operation is complete
The documentation for this class was generated from the following file: