Project

General

Profile

Bug #236 » bug.rb

radarek (Radosław Bułat), 07/09/2008 03:36 AM

 
$queue = []

def produce
$queue << true if rand(10) < 5
end

loop do
produce
while client = $queue.shift do
Thread.new(client) do |c|
raise "bug" if c == false
end
puts Thread.list.size
end
end

    (1-1/1)