Represents a callback that should be called asynchronously
with the result of a computation. Used by Task to signal
the completion of asynchronous computations on runAsync.
The onSuccess method should be called only once, with the successful
result, whereas onError should be called if the result is an error.