Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
interface LazyDeferred<out T>

Lazily invokes some the first time await or join is called.

Link copied to clipboard
internal class LazyDeferredImpl<T>(val action: suspend () -> T, val lock: Mutex) : LazyDeferred<T>
Link copied to clipboard
interface LazyResets<out T : Any> : Lazy<T> , Resets
Link copied to clipboard
internal class LazyResetsImpl<out T : Any>(val resetManager: ResetManager, val valueFactory: () -> T) : LazyResets<T>
Link copied to clipboard
interface LazySet<out E> : Flow<E> , LazySetComponent<E>
Link copied to clipboard
sealed interface LazySetComponent<out E>
Link copied to clipboard
class RealResetManager(val delegates: MutableCollection<Resets> = mutableListOf()) : DisposableHandle, ResetManager
Link copied to clipboard
interface ResetManager : Resets, Disposable
Link copied to clipboard
interface Resets
Link copied to clipboard
private class SynchronizedLazyVar<T>(initializer: () -> T) : ReadWriteProperty<Any?, T>

Functions

Link copied to clipboard
fun <T> suspend () -> T.asLazyDeferred(): LazyDeferred<T>
Link copied to clipboard
suspend fun <T> Collection<LazyDeferred<T>>.awaitAll(): List<T>
Link copied to clipboard
suspend fun <T : B, E : B, B> LazySet<T>.containsAny(elements: Collection<E>): Boolean
Link copied to clipboard
internal fun <E> createLazySet(children: Collection<LazySet<E>>, sources: Collection<LazySet.DataSource<E>>): LazySet<E>
Link copied to clipboard
fun <E> dataSource(priority: LazySet.DataSource.Priority = MEDIUM, factory: suspend () -> Set<E>): LazySet.DataSource<E>
Link copied to clipboard
fun <E> dataSourceOf(vararg elements: E, priority: LazySet.DataSource.Priority = MEDIUM): LazySet.DataSource<E>
Link copied to clipboard
Link copied to clipboard
inline suspend fun <T : E, E> LazySet<E>.getOrNull(element: E): T?
Link copied to clipboard
fun <T> lazyDeferred(action: suspend () -> T): LazyDeferred<T>

Lazily invokes action the first time await or join is called.

Link copied to clipboard
fun <T : Any> LazyResets(resetManager: ResetManager, valueFactory: () -> T): LazyResets<T>
Link copied to clipboard
inline fun <T : Any> ResetManager.lazyResets(noinline valueFactory: () -> T): LazyResets<T>
Link copied to clipboard
fun <E> lazySet(vararg children: LazySetComponent<E>): LazySet<E>
@JvmName(name = "lazySetSingle")
fun <E> lazySet(priority: LazySet.DataSource.Priority = MEDIUM, dataSource: suspend () -> E): LazySet<E>
fun <E> lazySet(priority: LazySet.DataSource.Priority = MEDIUM, dataSource: suspend () -> Set<E>): LazySet<E>
Link copied to clipboard
fun <T> lazyVar(initializer: () -> T): ReadWriteProperty<Any?, T>

just a var, but the initial value is lazy

Link copied to clipboard
Link copied to clipboard
fun <T> unsafeLazy(initializer: () -> T): Lazy<T>