Top Level Namespace
Defined Under Namespace
Modules: OSC Classes: Numeric, Object, Time
Instance Method Summary collapse
-
#synchronized(o) ⇒ Object
Obtain the Mutex associated with the object o, and then evaluate the block under the protection of that Mutex.
Instance Method Details
#synchronized(o) ⇒ Object
Obtain the Mutex associated with the object o, and then evaluate the block under the protection of that Mutex. This works like the synchronized keyword of Java.
6 7 8 |
# File 'lib/osc-ruby/core_ext/object.rb', line 6 def synchronized(o) o.mutex.synchronize { yield } end |