@ -30,4 +30,8 @@ class SoftSuspendLazy<T : Any>(
}
suspend fun tryGet() = runCatchingCancellable { get() }
fun peek(): T? {
return cachedValue?.get()
@ -32,5 +32,10 @@ class SuspendLazy<T>(
@Suppress("UNCHECKED_CAST")
return cachedValue?.takeUnless { it === Uninitialized } as T?
private object Uninitialized