Package arrow.fx.stm.internal

Types

Link copied to clipboard
class BlockedIndefinitely : Throwable

In some special cases it is possible to detect if a STM transaction blocks indefinitely so we can abort here.

Link copied to clipboard
sealed class Branch<out A>
Link copied to clipboard
data class Hamt<A>(val branches: TVar<Array<Branch<A>?>>)

Low level stm datastructure which can be used to efficiently implement other datastructures like Map/Set on top.

Link copied to clipboard
expect object RetryException : Throwable
actual object RetryException : Throwable
actual object RetryException : Throwable
actual object RetryException : Throwable

Functions

Link copied to clipboard
inline fun <A> STM.alterHamtWithHash(    hamt: Hamt<A>,     hash: Int,     test: (A) -> Boolean,     fn: (A?) -> A?): Boolean
Link copied to clipboard
fun Int.atDepth(d: Int): Int
Link copied to clipboard
fun <A> STM.clearHamt(hamt: Hamt<A>)
Link copied to clipboard
fun Int.index(): Int
Link copied to clipboard
fun Int.indexAtDepth(d: Int): Int
Link copied to clipboard
inline fun <A> STM.lookupHamtWithHash(    hmt: Hamt<A>,     hash: Int,     test: (A) -> Boolean): A?
Link copied to clipboard
fun <A> STM.newHamt(): Hamt<A>
Link copied to clipboard
fun Int.nextDepth(): Int
Link copied to clipboard
fun <A> STM.pair(    depth: Int,     hash1: Int,     branch1: Branch<A>,     hash2: Int,     branch2: Branch<A>): Hamt<A>

Properties

Link copied to clipboard
const val ARR_SIZE: Int = 32
Link copied to clipboard
const val DEPTH_STEP: Int = 5
Link copied to clipboard
const val MASK: Int