Package-level declarations

Types

Link copied to clipboard

A GenericMonitor implementation backed by an atomic boolean value.

Link copied to clipboard

A coroutine-based waiter that suspends until a boolean value changes.

Link copied to clipboard

A ConditionalValue specialized for boolean values, providing waitUntilTrue and waitUntilFalse convenience methods.

Link copied to clipboard
open class ConditionalValue<T>(initValue: T)

A coroutine-based conditional waiter backed by MutableStateFlow.

Link copied to clipboard
abstract class GenericExecutionThreadService : AbstractExecutionThreadService

Abstract base class that wraps Guava's AbstractExecutionThreadService with Kotlin Duration-based synchronous start and stop methods.

Link copied to clipboard
abstract class GenericIdleService : AbstractIdleService

Abstract base class that wraps Guava's AbstractIdleService with Kotlin Duration-based synchronous start and stop methods.

Link copied to clipboard
abstract class GenericMonitor

Abstract base class providing thread-blocking wait methods backed by a Guava Monitor.

Link copied to clipboard
abstract class GenericValueWaiter<T>(initValue: T)

Abstract coroutine-based waiter that suspends until a monitored value satisfies a condition.

Link copied to clipboard

A coroutine-based waiter that suspends until its boolean value toggles.

Link copied to clipboard
typealias MonitorAction = () -> Boolean

A function type used as a callback during timed monitor waits.

Link copied to clipboard

A CountDownLatch that logs a message on each wait timeout and retries until the latch reaches zero.

Properties

Link copied to clipboard

Whether this CountDownLatch has reached zero.

Functions

Link copied to clipboard
fun CountDownLatch.countDown(block: () -> Unit)

Executes block and calls CountDownLatch.countDown in a finally block, ensuring the latch is decremented even if the block throws.

Link copied to clipboard

Creates a Service.Listener for this Service that logs all lifecycle transitions (starting, running, stopping, terminated, failed) using the provided logger.

Link copied to clipboard
fun main()
fun main()
fun main()
Link copied to clipboard
fun main2()
Link copied to clipboard
fun main3()
Link copied to clipboard
fun main4()
Link copied to clipboard
fun thread(latch: CountDownLatch, start: Boolean = true, isDaemon: Boolean = false, contextClassLoader: ClassLoader? = null, name: String? = null, priority: Int = -1, block: () -> Unit): Thread

Creates a new thread that automatically counts down the given latch when block completes.

Link copied to clipboard
fun <T> Semaphore.withLock(block: () -> T): T

Acquires a permit from this Semaphore, executes block, and releases the permit in a finally block.