Sha256: 63ee510c6fe206c1703a279f4cd276dce5256e46187d5e96ae6c4a6e81f83146
Contents?: true
Size: 1.05 KB
Versions: 23
Compression:
Stored size: 1.05 KB
Contents
module Concurrent module Synchronization class Condition < Object singleton_class.send :alias_method, :private_new, :new private_class_method :new def initialize(lock) @Lock = lock ensure_ivar_visibility! super() end def wait(timeout = nil) @Lock.synchronize { ns_wait(timeout) } end def ns_wait(timeout = nil) synchronize { super(timeout) } end def wait_until(timeout = nil, &condition) @Lock.synchronize { ns_wait_until(timeout, &condition) } end def ns_wait_until(timeout = nil, &condition) synchronize { super(timeout, &condition) } end def signal @Lock.synchronize { ns_signal } end def ns_signal synchronize { super } end def broadcast @Lock.synchronize { ns_broadcast } end def ns_broadcast synchronize { super } end end class Object < Implementation def new_condition Condition.private_new(self) end end end end
Version data entries
23 entries across 21 versions & 5 rubygems