Package-level declarations

Types

Link copied to clipboard
interface AsyncCloseable

An interface that allows to close resources asynchronously.

Link copied to clipboard

An base AsyncCloseable that provides a default implementation for the close, so it is not mandatory overriding it.

Functions

Link copied to clipboard
inline suspend fun <T : AsyncCloseable?, TR> T.use(block: (T) -> TR): TR

Executes the block with the AsyncCloseable as parameter, and closes the resource once done.

Link copied to clipboard
inline suspend fun <T : AsyncCloseable?, TR> T.useIt(block: (T) -> TR): TR

Executes the block with the AsyncCloseable as parameter, and closes the resource once done.

Link copied to clipboard
inline suspend fun <T : AsyncCloseable?, TR> T.useThis(block: T.() -> TR): TR

Executes the block with the AsyncCloseable as receiver, and closes the resource once done.