AtomicCloseableScope

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
override val closed: Boolean

Whether the scope is closed.

Functions

Link copied to clipboard
override fun close()
Link copied to clipboard
open fun ensureNotClosed(lazyMessage: () -> String = { "Scope is closed" })

Throws IllegalStateException if closed is true.

Link copied to clipboard
inline fun <R> notClosed(crossinline lazyMessage: () -> String = { "Scope is closed" }, block: () -> R): R

Returns block's result or throws IllegalStateException if closed is true.

Link copied to clipboard
open fun onClose()

Notifies about scope closing.