IORuntimeBuilder

cats.effect.unsafe.IORuntimeBuilder
See theIORuntimeBuilder companion object
final class IORuntimeBuilder

Builder object for creating custom IORuntimes. Useful for creating IORuntime based on the default one but with some wrappers around execution contexts or custom shutdown hooks.

Attributes

Companion
object
Source
IORuntimeBuilder.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def addPoller(poller: Any, shutdown: () => Unit): IORuntimeBuilder

Attributes

Source
IORuntimeBuilder.scala
def addShutdownHook(shutdown: () => Unit): IORuntimeBuilder

Introduce additional shutdown hook to be executed after compute, blocking and scheduler shutdown logic is invoked

Introduce additional shutdown hook to be executed after compute, blocking and scheduler shutdown logic is invoked

Value parameters

shutdown

the shutdown hook executed upon IORuntime shutdown

Attributes

Source
IORuntimeBuilder.scala
def build(): IORuntime

Attributes

Source
IORuntimeBuilder.scala
def setBlocking(blocking: ExecutionContext, shutdown: () => Unit): IORuntimeBuilder

Override the default blocking execution context

Override the default blocking execution context

Value parameters

blocking

the ExecutionContext for blocking operations

shutdown

ExecutionContext shutdown hook

Attributes

Source
IORuntimeBuilder.scala
def setCompute(compute: ExecutionContext, shutdown: () => Unit): IORuntimeBuilder

Set a custom compute pool

Set a custom compute pool

Value parameters

compute

the ExecutionContext for the compute pool

shutdown

IORuntime shutdown hook

Attributes

Source
IORuntimeBuilder.scala

Provide custom IORuntimeConfig for created IORuntime

Provide custom IORuntimeConfig for created IORuntime

Value parameters

config

the runtime configuration

Attributes

Source
IORuntimeBuilder.scala
def setScheduler(scheduler: Scheduler, shutdown: () => Unit): IORuntimeBuilder

Override the default scheduler

Override the default scheduler

Value parameters

scheduler

the custom scheduler

shutdown

Scheduler shutdown hook

Attributes

Source
IORuntimeBuilder.scala

Modifies the execution underlying blocking execution context.

Modifies the execution underlying blocking execution context. Useful in case you want to use the default blocking context but add extra logic to execute, e.g. for adding instrumentation.

Value parameters

transform

the modification of the current blocking execution context

Attributes

Source
IORuntimeBuilder.scala

Modifies the execution underlying execution context.

Modifies the execution underlying execution context. Useful in case you want to use the default compute but add extra logic to execute, e.g. for adding instrumentation.

Value parameters

transform

the modification of the current compute execution context

Attributes

Source
IORuntimeBuilder.scala

Inherited methods

Attributes

Inherited from:
IORuntimeBuilderPlatform (hidden)
Source
IORuntimeBuilderPlatform.scala

Override the default PollingSystem

Override the default PollingSystem

Attributes

Inherited from:
IORuntimeBuilderPlatform (hidden)
Source
IORuntimeBuilderPlatform.scala

Inherited fields

Attributes

Inherited from:
IORuntimeBuilderPlatform (hidden)
Source
IORuntimeBuilderPlatform.scala