Class: Concurrent::Synchronization::Condition
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
LockableObject
|
|
Instance Chain:
self,
LockableObject
|
|
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
- .new(lock) ⇒ Condition constructor
Instance Method Summary
- #broadcast
- #ns_broadcast
- #ns_signal
- #ns_wait(timeout = nil)
- #ns_wait_until(timeout = nil, &condition)
- #signal
- #wait(timeout = nil)
- #wait_until(timeout = nil, &condition)
LockableObject
- Inherited
Constructor Details
.new(lock) ⇒ Condition
# 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