Sha256: 25d8f65e437e87fec8dd043120c33848719a9e7cae25d10a16ce0016b76ef80d

Contents?: true

Size: 445 Bytes

Versions: 8

Compression:

Stored size: 445 Bytes

Contents

class TestEventedMailbox < Celluloid::Mailbox::Evented
  class Reactor
    def initialize
      @condition = ConditionVariable.new
      @mutex = Mutex.new
    end

    def wakeup
      @mutex.synchronize do
        @condition.signal
      end
    end

    def run_once(timeout)
      @mutex.synchronize do
        @condition.wait(@mutex, timeout)
      end
    end

    def shutdown
    end
  end

  def initialize
    super(Reactor)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
celluloid-0.17.4 spec/support/examples/evented_mailbox_class.rb
celluloid-0.18.0.pre spec/support/examples/evented_mailbox_class.rb
celluloid-0.17.3 spec/support/examples/evented_mailbox_class.rb
celluloid-0.17.2 spec/support/examples/evented_mailbox_class.rb
celluloid-0.17.1.2 spec/support/examples/evented_mailbox_class.rb
celluloid-0.17.1.1 spec/support/examples/evented_mailbox_class.rb
celluloid-0.17.1 spec/support/examples/evented_mailbox_class.rb
celluloid-0.17.0 spec/support/examples/evented_mailbox_class.rb