Callback

<p> A callback abstraction that handles completed/failed events of asynchronous operations. </p> <p> <p> Semantically this is equivalent to an optimise Promise&lt;Void&gt;, but callback is a more meaningful name than EmptyPromise </p>

Members

Functions

failed
void failed(Exception x)

<p> Callback invoked when the operation fails. </p>

isNonBlocking
bool isNonBlocking()

@return True if the callback is known to never block the caller

succeeded
void succeeded()

<p> Callback invoked when the operation completes. </p>

Static variables

NOOP
Callback NOOP;

Instance of Adapter that can be used when the callback methods need an empty implementation without incurring in the cost of allocating a new Adapter object.

Meta