Sha256: 9285dfe66b0c96d4c6e7ee8807ca6be6e8beefc54fe8c05cb7c9e456c935fa9c
Contents?: true
Size: 486 Bytes
Versions: 2
Compression:
Stored size: 486 Bytes
Contents
require 'monitor' module Concurrent module Synchronization # @!visibility private # @!macro internal_implementation_note class MonitorObject < MutexObject def initialize @__lock__ = ::Monitor.new @__condition__ = @__lock__.new_cond end protected def synchronize @__lock__.synchronize { yield } end def ns_wait(timeout = nil) @__condition__.wait timeout self end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
concurrent-ruby-0.9.0 | lib/concurrent/synchronization/monitor_object.rb |
concurrent-ruby-0.9.0-java | lib/concurrent/synchronization/monitor_object.rb |