StaticGoal

open class StaticGoal<T>(val value: T) : Goal<T>

Inheritors

Constructors

Link copied to clipboard
constructor(value: T)

Properties

Link copied to clipboard
open override val deferred: Deferred<T>

Returns current running coroutine if the goal is started. Null if the computation is not started.

Link copied to clipboard
open override val dependencies: Collection<Goal<*>>
Link copied to clipboard
Link copied to clipboard
val value: T

Functions

Link copied to clipboard
open override fun async(coroutineScope: CoroutineScope): Deferred<T>

Get ongoing computation or start a new one. Does not guarantee thread safety. In case of multi-thread access, could create orphan computations.

Link copied to clipboard
suspend fun <T> Goal<T>.await(): T
Link copied to clipboard
fun Goal<*>.launch(coroutineScope: CoroutineScope): Job
Link copied to clipboard
open override fun reset()

Reset the computation