ZScope

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

Type members

Classlikes

sealed abstract class Key

Represents a key in a scope, which is associated with a single finalizer.

Represents a key in a scope, which is associated with a single finalizer.

Companion:
object
object Key
Companion:
class
final class Local[A](val finalizerCount: AtomicInteger, val exitValue: AtomicReference[A], val references: AtomicInteger, val weakFinalizers: Map[Key, OrderedFinalizer], val strongFinalizers: Map[Key, OrderedFinalizer]) extends ZScope[A]
sealed abstract class Mode
Companion:
object
object Mode
Companion:
class
final case class Open[A](close: A => UIO[Boolean], scope: Local[A])

A tuple that contains an open scope, together with a function that closes the scope.

A tuple that contains an open scope, together with a function that closes the scope.

object global extends ZScope[Nothing]

The global scope, which is entirely stateless. Finalizers added to the global scope will never be executed (nor kept in memory).

The global scope, which is entirely stateless. Finalizers added to the global scope will never be executed (nor kept in memory).

Value members

Concrete methods

def make[A]: UIO[Open[A]]

An effect that makes a new open scope, which provides not just the scope, but also a way to close the scope.

An effect that makes a new open scope, which provides not just the scope, but also a way to close the scope.