Future

inline class Future<T>

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

Functions

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

Blocks execution until the future is ready.

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

Properties

Link copied to clipboard
val id: Int
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.

Link copied to clipboard

A FutureState of this future