Future

Native
1.3
inline class Future<T>

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

Properties

Native
1.3

id

val id: Int
Native
1.3

result

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

val result: T
Native
1.3

state

A FutureState of this future

val state: FutureState

Functions

Native
1.3

consume

Blocks execution until the future is ready.

fun <R> consume(code: (T) -> R): R
Native
1.3

toString

Returns a string representation of the object.

fun toString(): String