class Concurrent::Synchronization::LockableObject
Safe synchronization under any Ruby implementation. It provides methods like {#synchronize}, {#wait}, {#signal} and {#broadcast}. Provides a single layer which can improve its implementation over time without changes needed to the classes using it. Use {Synchronization::Object} not this abstract class. @note this object does not support usage together with [`Thread#wakeup`](http://ruby-doc.org/core/Thread.html#method-i-wakeup) and [`Thread#raise`](http://ruby-doc.org/core/Thread.html#method-i-raise). `Thread#sleep` and `Thread#wakeup` will work as expected but mixing `Synchronization::Object#wait` and `Thread#wakeup` will not work on all platforms. @see Event implementation as an example of this class use @example simple class AnClass < Synchronization::Object def initialize super synchronize { @value = 'asd' } end def value synchronize { @value } end end
@!visibility private
Public Instance Methods
new_condition()
click to toggle source
# File lib/concurrent-ruby/concurrent/synchronization/condition.rb, line 57 def new_condition Condition.private_new(self) end