Package-level declarations
Types
Link copied to clipboard
A map of independent mutexes keyed by K, with mutual exclusion per key.
Link copied to clipboard
Deduplicates concurrent work by key: callers with equal keys share one in-flight execution.
Link copied to clipboard
A value initialized on first get, with one shared initialization across concurrent callers.
Link copied to clipboard
class Throttler(val window: Duration, timeSource: TimeSource.WithComparableMarks = TimeSource.Monotonic)
Runs at most one block per time window, rejecting calls that arrive too soon.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Runs every block concurrently and returns the result of the first one to succeed.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun CoroutineScope.launchPeriodic(interval: Duration, initialDelay: Duration = Duration.ZERO, action: suspend () -> Unit): Job
Launches a coroutine that runs action repeatedly with a fixed pause between runs.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Creates a SuspendLazy backed by initializer.
Link copied to clipboard
Runs block while holding this mutex only if the mutex is free, returning null otherwise.
Link copied to clipboard
Runs block while holding a permit only if one is available, returning null otherwise.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard