orbit-util / orbit.util.concurrent / Pools

Pools

object Pools

Concurrent pool/scheduler creation and utilities.

Properties

defaultParallelism

The ideal parallelism for this machine.

val defaultParallelism: Int

Functions

createCachedPool

Creates a cached pool ideal for IO intensive tasks.

fun createCachedPool(threadPrefix: String): CoroutineDispatcher

createFixedPool

Creates a fixed pool ideal for CPU intensive tasks.

fun createFixedPool(threadPrefix: String, maxThreads: Int = defaultParallelism): CoroutineDispatcher