ForkLocal

ox.ForkLocal
See theForkLocal companion object
class ForkLocal[T](scopedValue: ScopedValue[T], default: T)

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def get(): T
def scopedWhere[U](newValue: T)(f: Ox ?=> U): U

Creates a new scoped scope, where the value of this fork local is set to newValue, only for the duration of the scope.

Creates a new scoped scope, where the value of this fork local is set to newValue, only for the duration of the scope.

Warning: It is advisable to use supervised scopes if possible, as they minimise the chances of an error to go unnoticed. scoped scopes are considered an advanced feature, and should be used with caution.

Attributes

def supervisedErrorWhere[E, F[_], U](errorMode: ErrorMode[E, F])(newValue: T)(f: (OxError[E, F]) ?=> F[U]): F[U]

Creates a new supervisedError scope, where the value of this fork local is set to newValue, only for the duration of the scope.

Creates a new supervisedError scope, where the value of this fork local is set to newValue, only for the duration of the scope.

Attributes

def supervisedWhere[U](newValue: T)(f: Ox ?=> U): U

Creates a new supervised scope, where the value of this fork local is set to newValue, only for the duration of the scope.

Creates a new supervised scope, where the value of this fork local is set to newValue, only for the duration of the scope.

Attributes