SuspendLazy

interface SuspendLazy<out T>

Similar to Lazy but for suspend functions.

val suspendLazy = suspendLazy { suspendCall() }

suspendLazy() // retrieve

See also

Functions

Link copied to clipboard
abstract suspend fun get(): T

Function to retrieve the value.

Link copied to clipboard
open suspend operator fun invoke(): T

Operator function calling get for more idiomatic use.

Link copied to clipboard
abstract fun isInitialized(): Boolean

Whether the value has been already initialized.