123456789_123456789_123456789_123456789_123456789_

Class: Concurrent::Synchronization::Condition

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Concurrent::Synchronization::LockableObject
Defined in: lib/concurrent-ruby/concurrent/synchronization/condition.rb

Overview

TODO (pitr-ch 04-Dec-2016): should be in edge

Class Method Summary

Instance Method Summary

Constructor Details

.new(lock) ⇒ Condition

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/synchronization/condition.rb', line 18

def initialize(lock)
  super()
  @Lock = lock
end

Instance Method Details

#broadcast

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/synchronization/condition.rb', line 47

def broadcast
  @Lock.synchronize { ns_broadcast }
end

#ns_broadcast

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/synchronization/condition.rb', line 51

def ns_broadcast
  synchronize { super }
end

#ns_signal

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/synchronization/condition.rb', line 43

def ns_signal
  synchronize { super }
end

#ns_wait(timeout = nil)

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/synchronization/condition.rb', line 27

def ns_wait(timeout = nil)
  synchronize { super(timeout) }
end

#ns_wait_until(timeout = nil, &condition)

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/synchronization/condition.rb', line 35

def ns_wait_until(timeout = nil, &condition)
  synchronize { super(timeout, &condition) }
end

#signal

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/synchronization/condition.rb', line 39

def signal
  @Lock.synchronize { ns_signal }
end

#wait(timeout = nil)

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/synchronization/condition.rb', line 23

def wait(timeout = nil)
  @Lock.synchronize { ns_wait(timeout) }
end

#wait_until(timeout = nil, &condition)

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/synchronization/condition.rb', line 31

def wait_until(timeout = nil, &condition)
  @Lock.synchronize { ns_wait_until(timeout, &condition) }
end