Watson1978
5/16/2011 - 12:29 AM

MacRuby : test with https://github.com/MacRuby/MacRuby/pull/24

# test_priority
c1 = c2 = 0
t1 = Thread.new { loop { c1 += 1 } }
t1.priority = -1
t2 = Thread.new { loop { c2 += 1 } }
t2.priority = -3
assert_equal(-1, t1.priority)
assert_equal(-3, t2.priority)
sleep 0.5
5.times do
  break if c1 > c2
  sleep 0.1
end
t1.kill
t2.kill