Sha256: deec1d06c9f33b2d3d29692dd23e7605a0adee900f42090664077265193b145c

Contents?: true

Size: 275 Bytes

Versions: 1

Compression:

Stored size: 275 Bytes

Contents

require 'tools/waiting_queue.rb'

describe "Waiting Queue" do
  it "should hold a thread until queue is filled" do
    q=WaitingQueue.new
    value=nil
    Thread.new(value) {|value|
      value=q.pop
    }
    sleep 2
    q<<123
    sleep 1
    value.should == 123
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appswarm-0.0.1 lib/appswarm/tools/spec/waiting_queue_spec.rb