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

Version Path
logstash-filter-zabbix-0.1.2 vendor/bundle/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/condition.rb
logstash-filter-zabbix-0.1.1 vendor/bundle/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/condition.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/condition.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/condition.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/condition.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/condition.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/logstash-codec-json-2.0.3/vendor/gems/concurrent-ruby-0.9.1-java/lib/concurrent/synchronization/condition.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/synchronization/condition.rb
logstash-codec-json-2.0.3 vendor/gems/concurrent-ruby-0.9.1-java/lib/concurrent/synchronization/condition.rb
concurrent-ruby-0.9.2-java lib/concurrent/synchronization/condition.rb
concurrent-ruby-0.9.2 lib/concurrent/synchronization/condition.rb
logstash-input-beats-0.9.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/synchronization/condition.rb
logstash-input-beats-0.9.1 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/synchronization/condition.rb
concurrent-ruby-1.0.0.pre1 lib/concurrent/synchronization/condition.rb
concurrent-ruby-1.0.0.pre1-java lib/concurrent/synchronization/condition.rb
concurrent-ruby-0.9.1 lib/concurrent/synchronization/condition.rb
concurrent-ruby-0.9.1-java lib/concurrent/synchronization/condition.rb
concurrent-ruby-0.9.0 lib/concurrent/synchronization/condition.rb
concurrent-ruby-0.9.0-java lib/concurrent/synchronization/condition.rb
concurrent-ruby-0.9.0.pre3-java lib/concurrent/synchronization/condition.rb