AsyncCloseable

interface AsyncCloseable

A resource whose release may wait.

The handles of an AsyncMediaRuntime close through the runtime's lane, which is the one place the runtime runs codec work. A close therefore waits for the work that holds the lane.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun close()

Releases the resource. A second call waits for the first and reports the same result. A close finishes even when its caller is cancelled.