class Concurrent::Synchronization::MriMonitorLockableObject
@!visibility private @!macro internal_implementation_note
Public Class Methods
new(*defaults)
click to toggle source
Calls superclass method
Concurrent::Synchronization::Object.new
# File lib/concurrent/synchronization/mri_lockable_object.rb, line 53 def initialize(*defaults) super(*defaults) @__lock__ = ::Monitor.new @__condition__ = @__lock__.new_cond end
Protected Instance Methods
ns_wait(timeout = nil)
click to toggle source
# File lib/concurrent/synchronization/mri_lockable_object.rb, line 65 def ns_wait(timeout = nil) @__condition__.wait timeout self end
synchronize() { || ... }
click to toggle source
# File lib/concurrent/synchronization/mri_lockable_object.rb, line 61 def synchronize # TODO may be a problem with lock.synchronize { lock.wait } @__lock__.synchronize { yield } end