sealed trait Closeable extends Scope
- Self Type
- Closeable
- Alphabetic
- By Inheritance
- Closeable
- Scope
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def addFinalizerExit(finalizer: (Exit[Any, Any]) => UIO[Any])(implicit trace: Trace): UIO[Unit]
Adds a finalizer to this scope.
Adds a finalizer to this scope. The finalizer is guaranteed to be run when the scope is closed.
- Definition Classes
- Scope
- abstract def close(exit: => Exit[Any, Any])(implicit trace: Trace): UIO[Unit]
Closes a scope with the specified exit value, running all finalizers that have been added to the scope.
- abstract def forkWith(executionStrategy: => ExecutionStrategy)(implicit trace: Trace): UIO[Closeable]
Forks a new scope that is a child of this scope.
Forks a new scope that is a child of this scope. Finalizers added to the child scope will be run according to the specified
ExecutionStrategy
. The child scope will automatically be closed when this scope is closed.- Definition Classes
- Scope
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def addFinalizer(finalizer: => UIO[Any])(implicit trace: Trace): UIO[Unit]
A simplified version of
addFinalizerWith
when thefinalizer
does not depend on theExit
value that the scope is closed with.A simplified version of
addFinalizerWith
when thefinalizer
does not depend on theExit
value that the scope is closed with.- Definition Classes
- Scope
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def executionStrategy: ExecutionStrategy
The execution strategy finalizers associated with this scope will be run with.
The execution strategy finalizers associated with this scope will be run with.
- Definition Classes
- Scope
- final def extend[R]: ExtendPartiallyApplied[R]
Extends the scope of a
ZIO
workflow that needs a scope into this scope by providing it to the workflow but not closing the scope when the workflow completes execution.Extends the scope of a
ZIO
workflow that needs a scope into this scope by providing it to the workflow but not closing the scope when the workflow completes execution. This allows extending a scoped value into a larger scope.- Definition Classes
- Scope
- final def fork(implicit trace: Trace): UIO[Closeable]
Forks a new scope that is a child of this scope.
Forks a new scope that is a child of this 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. The child scope will automatically be closed when this scope is closed.
- Definition Classes
- Scope
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def use[R]: UsePartiallyApplied[R]
Uses the scope by providing it to a
ZIO
workflow that needs a scope, guaranteeing that the scope is closed with the result of that workflow as soon as the workflow completes execution, whether by success, failure, or interruption. - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()