class Concurrent::Agent
def initialize(initial, opts = {})
(**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