Package-level declarations

Types

Link copied to clipboard
expect class AtomicRef<V>(initialValue: V)
actual class AtomicRef<V>(initialValue: V)
actual typealias AtomicRef<V> = AtomicReference<V>
actual class AtomicRef<V>(initialValue: V)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

AVOID USING THIS TYPE, it's meant for low-level cancellation code When in need in low-level code, you can use this type to differentiate between a foreign CancellationException and the one from Effect.

Functions

Link copied to clipboard
suspend fun <B> NullableEagerEffectScope.ensureNotNull(value: B?): B
suspend fun <B> NullableEffectScope.ensureNotNull(value: B?): B
suspend fun <B> OptionEagerEffectScope.ensureNotNull(value: B?): B
suspend fun <B> OptionEffectScope.ensureNotNull(value: B?): B
Link copied to clipboard
inline fun <V> AtomicRef<V>.getAndUpdate(function: (V) -> V): V

Updates variable atomically using the specified function of its value and returns its old value.

Link copied to clipboard
inline fun <V> AtomicRef<V>.loop(action: (V) -> Unit): Nothing

Infinite loop that reads this atomic variable and performs the specified action on its value.

Link copied to clipboard
fun <A> EagerEffect<A, A>.merge(): A
suspend fun <A> Effect<A, A>.merge(): A
Link copied to clipboard
suspend fun <A> Effect<None, A>.toOption(): Option<A>
Link copied to clipboard
Link copied to clipboard
inline fun <V> AtomicRef<V>.update(function: (V) -> V)
Link copied to clipboard
inline fun <V> AtomicRef<V>.updateAndGet(function: (V) -> V): V

Updates variable atomically using the specified function of its value and returns its new value.