Resource

Resource models a shared resource which can be acquired and released.

Inheritors

Types

Link copied to clipboard
fun interface Acquired : AutoCloseable

Acquired is the acquired resource itself, released by calling close.

Properties

Link copied to clipboard
abstract val type: ResourceType

Functions

Link copied to clipboard
abstract fun tryAcquire(): T?

Attempts to acquire the resource.