Future

value class Future<T>(source)

Class representing abstract computation, whose result may become available in the future.

Since Kotlin

1.3

Properties

Link copied to clipboard
val id: Int
Since Kotlin 1.3
Link copied to clipboard
val result: T

The result of the future computation. Blocks execution until the future is ready. Second attempt to get will result in an error.

Since Kotlin 1.3
Link copied to clipboard

A FutureState of this future

Since Kotlin 1.3

Functions

Link copied to clipboard
inline fun <R> consume(code: (T) -> R): R

Blocks execution until the future is ready.

Since Kotlin 1.3
Link copied to clipboard
open override fun toString(): String
Since Kotlin 1.3