olp-cpp-sdk  1.22.0
Public Member Functions | List of all members
olp::thread::TaskContinuation Class Referencefinal

Creates a chain of tasks for an asynchronous execution. More...

#include <TaskContinuation.h>

Public Member Functions

 TaskContinuation (std::shared_ptr< thread::TaskScheduler > scheduler)
 Creates the TaskContinuation instance. More...
 
template<typename Callable >
Continuation< internal::AsyncResultType< Callable > > Then (Callable task)
 Initializes the Continuation object. More...
 

Detailed Description

Creates a chain of tasks for an asynchronous execution.

Constructor & Destructor Documentation

◆ TaskContinuation()

olp::thread::TaskContinuation::TaskContinuation ( std::shared_ptr< thread::TaskScheduler scheduler)
explicit

Creates the TaskContinuation instance.

Parameters
schedulerThe TaskScheduler instance.

Member Function Documentation

◆ Then()

template<typename Callable >
Continuation< internal::AsyncResultType< Callable > > olp::thread::TaskContinuation::Then ( Callable  task)

Initializes the Continuation object.

It creates the Continuation instance with a template callback as a parameter, which is the first task in the task continuation chain.

Parameters
taskA task you want to add to the continuation chain.

The documentation for this class was generated from the following files: