ConditionalHotswapRefConstructor

Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[F[_], I, R](initial: I)(make: I => Resource[F, R])(`evidence$1`: Concurrent[F], `evidence$2`: Eq[I]): Resource[F, ConditionalHotswapRefConstructor[F, I, R]]

Creates a new ConditionalHotswapRefConstructor initialized using initial and make. The ConditionalHotswapRefConstructor instance is returned within a cats.effect.kernel.Resource.

Creates a new ConditionalHotswapRefConstructor initialized using initial and make. The ConditionalHotswapRefConstructor instance is returned within a cats.effect.kernel.Resource.

A cats.kernel.Eq instance for I is required for maybeSwapWith to compare the current and next values of I.

Value Params
initial

the initial value of input I to be used to construct R

make

used to construct a cats.effect.kernel.Resource of R from I, called on construction and when swapWith or maybeSwapWith is used.