global

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).

class ZScope[Nothing]
class Object
trait Matchable
class Any
global.type

Value members

Concrete methods

def ensure(finalizer: Nothing => UIO[Any], mode: Mode): UIO[Either[Nothing, Key]]

Inherited methods

def deny(key: => Key): UIO[Boolean]

Prevents a previously added finalizer from being executed when the scope is closed. The returned effect will succeed with true if the finalizer will not be run by this scope, and false otherwise.

Prevents a previously added finalizer from being executed when the scope is closed. The returned effect will succeed with true if the finalizer will not be run by this scope, and false otherwise.

Inherited from:
ZScope
final def extend(that: ZScope[Any]): UIO[Boolean]

Extends the specified scope so that it will not be closed until this scope is closed. Note that extending a scope into the global scope will result in the scope never being closed!

Extends the specified scope so that it will not be closed until this scope is closed. Note that extending a scope into the global scope will result in the scope never being closed!

Scope extension does not result in changes to the scope contract: open scopes must always be closed.

Inherited from:
ZScope

Determines if the scope is open at the moment the effect is executed. Returns an effect that will succeed with true if the scope is open, and false otherwise.

Determines if the scope is open at the moment the effect is executed. Returns an effect that will succeed with true if the scope is open, and false otherwise.

Inherited from:
ZScope