-
-
Method Summary
Modifier and Type Method Description abstract Result<T>execute()Executes the call synchronously, in a blocking way. abstract Unitenqueue(Function1<Result<T>, Unit> callback)Executes the call asynchronously, on a background thread. abstract Unitcancel()Cancels the execution of the call, if cancellation is supported for the operation. -
-
Method Detail
-
execute
@WorkerThread() abstract Result<T> execute()
Executes the call synchronously, in a blocking way. Only call this from a background thread.
-
enqueue
abstract Unit enqueue(Function1<Result<T>, Unit> callback)
Executes the call asynchronously, on a background thread. Safe to call from the main thread. The callback will always be invoked on the main thread.
-
-
-
-