Runtime

object Runtime
Companion:
class
class Object
trait Matchable
class Any
Runtime.type

Type members

Classlikes

abstract class Managed[+R] extends Runtime[R]

A runtime that can be shutdown to release resources allocated to it.

A runtime that can be shutdown to release resources allocated to it.

Companion:
object
object Managed
Companion:
class

Value members

Concrete methods

def apply[R](r: R, platform0: Platform): Runtime[R]

Builds a new runtime given an environment R and a zio.internal.Platform.

Builds a new runtime given an environment R and a zio.internal.Platform.

def unsafeFromLayer[R <: Has[_]](layer: Layer[Any, R], platform: Platform): Managed[R]

Unsafely creates a Runtime from a ZLayer whose resources will be allocated immediately, and not released until the Runtime is shut down or the end of the application.

Unsafely creates a Runtime from a ZLayer whose resources will be allocated immediately, and not released until the Runtime is shut down or the end of the application.

This method is useful for small applications and integrating ZIO with legacy code, but other applications should investigate using ZIO.provideLayer directly in their application entry points.

Concrete fields

lazy val default: Runtime[ZEnv]
lazy val global: Runtime[ZEnv]