Class: Farce::Strict::Atom
- Inherits:
-
Abstract::Atom
- Object
- Abstract::Atom
- Farce::Strict::Atom
- Includes:
- Farce::Shareable::Delegated
- Defined in:
- lib/farce/strict/atom.rb
Overview
A Ractor-shareable atomic reference that strongly retains shareable values directly. Values are stored without envelope wrapping or transfer modes.
Instance Method Summary collapse
-
#initialize(value = nil, compare_by_identity: false) ⇒ Atom
constructor
A new instance of Atom.
Methods included from Farce::Shareable
Methods inherited from Abstract::Atom
#blank?, #compare_and_set, #compare_by_identity?, #get, #store, #store_if_absent, #swap, #update, #upsert, #value, #value=, #wait_until, #wait_until_changed, #wait_until_match, #wait_until_non_nil, #wait_until_value, #wait_while, #wait_while_match, #wait_while_value
Methods included from Internal::ValueSerialization
#as_extended_json, #as_json, #to_bson, #to_bson_normalized_value, #to_cbor, #to_json, #to_msgpack
Methods included from Abstract::Value
Methods included from Internal::Copyable
Constructor Details
#initialize(value = nil, compare_by_identity: false) ⇒ Atom
Returns a new instance of Atom.
26 27 28 29 |
# File 'lib/farce/strict/atom.rb', line 26 def initialize(value = nil, compare_by_identity: false) @atom = Internal::StrictAtom.new(value, compare_by_identity:) super() end |