A generic template for Continuation
.
More...
#include <Continuation.h>
template<typename ResultType>
class olp::thread::Continuation< ResultType >
A generic template for Continuation
.
◆ Continuation() [1/2]
template<typename ResultType >
Creates the Continuation
instance.
- Parameters
-
task_scheduler | The TaskScheduler instance. |
context | The ExecutionContext instance. |
task | The continuation task's callback. It contains the execution context and returns a value for the next task. |
◆ Continuation() [2/2]
template<typename ResultType >
Creates the Continuation
instance.
- Parameters
-
continuation | The ContinuationImpl instance. |
◆ CancelToken()
template<typename ResultType >
Provides a token to cancel the task.
- Returns
- The
CancellationToken
instance.
◆ Finally()
template<typename ResultType >
Handles the finalization of the Continuation
instance and sets a callback for it.
- Parameters
-
finally_callback | The callback that handles successful and unsuccessful results. |
- Returns
- The
Continuation
instance.
◆ Then() [1/2]
template<typename ResultType >
template<typename Callable >
Adds the next asynchronous task to the ContinuationImpl
instance.
- Parameters
-
task | The ContinuationTask instance. It represents a task that you want to add to the continuation chain. |
◆ Then() [2/2]
template<typename ResultType >
template<typename NewType >
Adds the next asynchronous task to the ContinuationImpl
instance.
- Parameters
-
execution_func | A task that you want to add to the continuation chain. |
The documentation for this class was generated from the following files:
- olp-cpp-sdk-core/include/olp/core/thread/Continuation.h
- olp-cpp-sdk-core/include/olp/core/thread/Continuation.inl