olp-cpp-sdk
1.21.0
|
An implementation helper interface used to declare the Execute
, BlockingCancel
, and CancelToken
functions used by the TaskContext
instance.
More...
#include <TaskContext.h>
Public Member Functions | |
virtual void | Execute ()=0 |
Checks for the cancellation, executes the task, and calls the callback with the result or error. | |
virtual bool | BlockingCancel (std::chrono::milliseconds timeout)=0 |
Cancels the operation and waits for the notification. More... | |
virtual client::CancellationToken | CancelToken ()=0 |
Provides a token to cancel the task. More... | |
An implementation helper interface used to declare the Execute
, BlockingCancel
, and CancelToken
functions used by the TaskContext
instance.
|
pure virtual |
Cancels the operation and waits for the notification.
timeout | The time (in milliseconds) to wait for the task to finish. |
Implemented in olp::client::TaskContext::TaskContextImpl< Response >.
|
pure virtual |
Provides a token to cancel the task.
CancellationToken
instance. Implemented in olp::client::TaskContext::TaskContextImpl< Response >.