RunnableFuture

interface RunnableFuture<T> : Future<T> , Runnable

Interface to replace java.util.concurrent.RunnableFuture

Inheritors

Functions

Link copied to clipboard
abstract fun cancel(mayInterruptIfRunning: Boolean): Boolean

Attempts to cancel execution of this task.

Link copied to clipboard
abstract suspend fun get(): T

Waits if necessary for the computation to complete, then returns the result.

Link copied to clipboard
abstract fun isCancelled(): Boolean

Returns true if the task was cancelled before completion.

Link copied to clipboard
abstract fun isDone(): Boolean

Returns true if the task completed (either successfully, with an exception, or was cancelled).

Link copied to clipboard
expect abstract fun run()