Package-level declarations

Types

Link copied to clipboard
interface Closeable

Represents a resource or entity that can be closed to release any associated resources.

Properties

Link copied to clipboard

A platform-specific CoroutineDispatcher optimized for executing IO-intensive operations.

Represents a CoroutineDispatcher that is suitable for IO-intensive operations. Delegates to the default dispatcher, which is optimized for tasks such as file I/O, network operations, or database queries that do not heavily utilize CPU resources. It is designed to handle a large number of tasks with minimal thread overhead.

A platform-specific property that represents a coroutine dispatcher suitable for IO-intensive tasks, such as file or network operations. It typically maps to Dispatchers.IO and provides an optimized thread pool for handling such workloads.

A CoroutineDispatcher that is suitable for IO operations. It delegates to Dispatchers.Default, which is optimized for CPU-intensive tasks but can also be used for IO-bound or mixed workloads when a specific dispatcher for IO is not required or unavailable.

Functions

Link copied to clipboard
inline suspend fun <Type : Closeable, Return> Type.use(action: suspend (Type) -> Return): Return

Executes the given action block on this Closeable resource and ensures that the resource is closed after the block execution, whether it completes normally or with an exception.