Base class for all async results (argument of completion callbacks). More...
#include <Async.h>
Public Member Functions | |
AsyncResult (AsyncEventLoop &eventLoop, AsyncRequest &request, SC::Result &res, bool *hasBeenReactivated=nullptr) | |
Constructs an async result from a request and a result. | |
void | reactivateRequest (bool shouldBeReactivated) |
Ask the event loop to re-activate this request after it was already completed. | |
const SC::Result & | isValid () const |
Check if the returnCode of this result is valid. | |
Public Attributes | |
AsyncEventLoop & | eventLoop |
AsyncRequest & | async |
Protected Attributes | |
bool | shouldCallCallback = true |
bool * | hasBeenReactivated = nullptr |
SC::Result & | returnCode |
Friends | |
struct | AsyncEventLoop |
Base class for all async results (argument of completion callbacks).
It holds Result (returnCode) and re-activation flag.
|
inline |
Constructs an async result from a request and a result.
|
inlinenodiscard |
Check if the returnCode of this result is valid.
void SC::AsyncResult::reactivateRequest | ( | bool | shouldBeReactivated | ) |
Ask the event loop to re-activate this request after it was already completed.
shouldBeReactivated | true will reactivate the request |