Module: Concurrent::Synchronization

Defined in:
lib/concurrent/synchronization.rb,
lib/concurrent/synchronization/lock.rb,
lib/concurrent/synchronization/object.rb,
lib/concurrent/synchronization/volatile.rb,
lib/concurrent/synchronization/condition.rb,
lib/concurrent/synchronization/mri_object.rb,
lib/concurrent/synchronization/rbx_object.rb,
lib/concurrent/synchronization/jruby_object.rb,
lib/concurrent/synchronization/truffle_object.rb,
lib/concurrent/synchronization/abstract_object.rb,
lib/concurrent/synchronization/abstract_struct.rb,
lib/concurrent/synchronization/lockable_object.rb,
lib/concurrent/synchronization/mri_lockable_object.rb,
lib/concurrent/synchronization/rbx_lockable_object.rb,
lib/concurrent/synchronization/jruby_lockable_object.rb,
lib/concurrent/synchronization/truffle_lockable_object.rb,
lib/concurrent/synchronization/abstract_lockable_object.rb

Overview

Defined Under Namespace

Modules: JRubyAttrVolatile, MriAttrVolatile, RbxAttrVolatile, TruffleAttrVolatile Classes: Condition, Lock, Object, TruffleLockableObject

Constant Summary collapse

Volatile =

Volatile adds the attr_volatile class method when included.

foo = Foo.new
foo.bar
=> 1
foo.bar = 2
=> 2

Examples:

class Foo
  include Concurrent::Synchronization::Volatile

  attr_volatile :bar

  def initialize
    self.bar = 1
  end
end
case
when Concurrent.on_cruby?
  MriAttrVolatile
when Concurrent.on_jruby?
  JRubyAttrVolatile
when Concurrent.on_rbx? || Concurrent.on_truffle?
  RbxAttrVolatile
else
  MriAttrVolatile
end

Instance Method Summary collapse

Instance Method Details

#broadcastObject



# File 'lib/concurrent/synchronization/lockable_object.rb', line 69

#initialize(*args, &block) ⇒ Object



# File 'lib/concurrent/synchronization/lockable_object.rb', line 54

#signalObject



# File 'lib/concurrent/synchronization/lockable_object.rb', line 66

#synchronizeObject



# File 'lib/concurrent/synchronization/lockable_object.rb', line 57

#wait(timeout = nil) ⇒ Object



# File 'lib/concurrent/synchronization/lockable_object.rb', line 63

#wait_until(timeout = nil, &condition) ⇒ Object



# File 'lib/concurrent/synchronization/lockable_object.rb', line 60