Future

Native
1.3
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

equals

Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements:

fun equals(other: Any?): Boolean
Native
1.3

hashCode

Returns a hash code value for the object. The general contract of hashCode is:

fun hashCode(): Int
Native
1.3

toString

Returns a string representation of the object.

fun toString(): String