Adds a shutdown hook that executes the specified action on shutdown.
Adds a shutdown hook that executes the specified action on shutdown.
Adds a signal handler for the specified signal (e.g.
Adds a signal handler for the specified signal (e.g. "INFO"). This method never fails even if adding the handler fails.
On Scala.js, signal handlers are triggered by changing the hash of the URL to include "zio-signal=INFO" (for the "INFO" signal).
Exits the application with the specified exit code.
Exits the application with the specified exit code.
Returns the name of the thread group to which this thread belongs.
Returns the name of the thread group to which this thread belongs. This is a side-effecting method.
Returns whether the current platform is ScalaJS.
Returns whether the current platform is ScalaJS.
Returns whether the currently platform is the JVM.
Returns whether the currently platform is the JVM.
Returns whether the currently platform is Scala Native.
Returns whether the currently platform is Scala Native.
A Runtime with settings suitable for benchmarks, specifically with Tracing and auto-yielding disabled.
A Runtime with settings suitable for benchmarks, specifically with Tracing and auto-yielding disabled.
Tracing adds a constant ~2x overhead on FlatMaps, however, it's an optional feature and it's not valid to compare the performance of ZIO with enabled Tracing with effect types _without_ a comparable feature.
(Since version 2.0.0) use RuntimeConfig.benchmark
The default platform, configured with settings designed to work well for mainstream usage.
The default platform, configured with settings designed to work well for mainstream usage. Advanced users should consider making their own platform customized for specific application requirements.
(Since version 2.0.0) use RuntimeConfig.default
The default number of operations the ZIO runtime should execute before yielding to other fibers.
The default number of operations the ZIO runtime should execute before yielding to other fibers.
(Since version 2.0.0) use RuntimeConfig.defaultYieldOpCount
Creates a Platform from an execution context.
Creates a Platform from an execution context.
(Since version 2.0.0) use RuntimeConfig.fromExecutionContext
Creates a platform from an Executor
.
Creates a platform from an Executor
.
(Since version 2.0.0) use RuntimeConfig.fromExecutor
A Platform
created from Scala's global execution context.
A Platform
created from Scala's global execution context.
(Since version 2.0.0) use RuntimeConfig.global
Makes a new default platform.
Makes a new default platform. This is a side-effecting method.
(Since version 2.0.0) use RuntimeConfig.makeDefault