class Concurrent::Atom

def initialize(value, opts = {})

Raises:
  • (ArgumentError) - if the validator is not a `Proc` (when given)

Options Hash: (**opts)
  • :validator (Proc) -- Optional proc used to validate new

Parameters:
  • opts (Hash) -- The options used to configure the atom
  • value (Object) -- The initial value
def initialize(value, opts = {})
  super()
  @Validator     = opts.fetch(:validator, -> v { true })
  self.observers = Collection::CopyOnNotifyObserverSet.new
  self.value     = value
end