A wrapper that manages the cancellation state of an asynchronous operation in a thread-safe way.
Definition: CancellationContext.h:40
Handles the cancellation and final mechanisms.
Definition: ExecutionContext.h:31
void ExecuteOrCancelled(const ExecuteFuncType &execute_fn, const CancelFuncType &cancel_fn=nullptr)
ExecutionContext()
A default contructor, initializes the ExecutionContextImpl instance.
const client::CancellationContext & GetContext() const
Gets the CancellationContext object associated with this ExecutionContext instance.
bool Cancelled() const
Checks whether CancellationContext is cancelled.
void SetError(client::ApiError error)
Sets the error that is returned in the Finally method of the execution.
void SetFailedCallback(FailedCallback callback)
Sets a callback for SetError.