ResourceScope
Functions
Creates a Resource from an AutoCloseable, which uses AutoCloseable.close for releasing.
Creates a Resource from an Closeable, which uses Closeable.close for releasing.
Creates a single threaded CoroutineContext as a Resource. Upon release an orderly shutdown of the ExecutorService takes place in which previously submitted tasks are executed, but no new tasks will be accepted.
Creates a single threaded CoroutineContext as a Resource. Upon release an orderly shutdown of the ExecutorService takes place in which previously submitted tasks are executed, but no new tasks will be accepted.
Install A into the ResourceScope. Its release function will be called with the appropriate ExitCase if this ResourceScope finishes. It results either in ExitCase.Completed, ExitCase.Cancelled or ExitCase.Failure depending on the terminal state of Resource lambda.
Composes a releaseCase action to a Resource value before binding.
Creates a single threaded CoroutineContext as a Resource. Upon release an orderly shutdown of the ExecutorService takes place in which previously submitted tasks are executed, but no new tasks will be accepted.