class Concurrent::Agent

def initialize(initial, opts = {})

Options Hash: (**opts)
  • :validator (nil, Proc) -- the (optional) validation procedure
  • :error_handler (nil, Proc) -- the (optional) error handler
  • :error_mode (Symbol) -- either `:continue` or `:fail`

Parameters:
  • opts (Hash) -- the configuration options
  • initial (Object) -- the initial value
def initialize(initial, opts = {})
  super()
  synchronize { ns_initialize(initial, opts) }
end