Scope

zio.Scope$
See theScope companion trait
object Scope

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Scope.type

Members list

Concise view

Type members

Classlikes

sealed trait Closeable extends Scope

Attributes

Graph
Supertypes
trait Scope
class Object
trait Matchable
class Any
Self type
final class ExtendPartiallyApplied[R](scope: Scope) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class UsePartiallyApplied[R](scope: Closeable) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def addFinalizer(finalizer: => UIO[Any])(implicit trace: Trace): ZIO[Scope, Nothing, Unit]

Accesses a scope in the environment and adds a finalizer to it.

Accesses a scope in the environment and adds a finalizer to it.

Attributes

def addFinalizerExit(finalizer: Exit[Any, Any] => UIO[Any])(implicit trace: Trace): ZIO[Scope, Nothing, Unit]

Accesses a scope in the environment and adds a finalizer to it.

Accesses a scope in the environment and adds a finalizer to it.

Attributes

def make(implicit trace: Trace): UIO[Closeable]

Makes a scope. Finalizers added to this scope will be run sequentially in the reverse of the order in which they were added when this scope is closed.

Makes a scope. Finalizers added to this scope will be run sequentially in the reverse of the order in which they were added when this scope is closed.

Attributes

def makeWith(executionStrategy: => ExecutionStrategy)(implicit trace: Trace): UIO[Closeable]

Makes a scope. Finalizers added to this scope will be run according to the specified ExecutionStrategy.

Makes a scope. Finalizers added to this scope will be run according to the specified ExecutionStrategy.

Attributes

def parallel(implicit trace: Trace): UIO[Closeable]

Makes a scope. Finalizers added to this scope will be run in parallel when this scope is closed.

Makes a scope. Finalizers added to this scope will be run in parallel when this scope is closed.

Attributes

Concrete fields

val default: ZLayer[Any, Nothing, Scope]

A layer that constructs a scope and closes it when the workflow the layer is provided to completes execution, whether by success, failure, or interruption. This can be used to close a scope when providing a layer to a workflow.

A layer that constructs a scope and closes it when the workflow the layer is provided to completes execution, whether by success, failure, or interruption. This can be used to close a scope when providing a layer to a workflow.

Attributes

The global scope which is never closed. Finalizers added to this scope will be immediately discarded and closing this scope has no effect.

The global scope which is never closed. Finalizers added to this scope will be immediately discarded and closing this scope has no effect.

Attributes