Sha256: bf16d16e8b629bab2470032ec880a6a934fc74f388fcc49006fe3f45a935435e
Contents?: true
Size: 445 Bytes
Versions: 2
Compression:
Stored size: 445 Bytes
Contents
$VERBOSE = true $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) if $0 == __FILE__ require 'rubygems' require 'minitest/autorun' require 'proco' class TestPool < MiniTest::Unit::TestCase def test_pool pool = Proco::MT::Pool.new(8) cnt = 0 mtx = Mutex.new 1000.times do pool.assign { mtx.synchronize { cnt += 3 } } end pool.exit assert_equal 1000, pool.counter assert_equal 3000, cnt end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
proco-0.0.2 | test/test_pool.rb |
proco-0.0.1 | test/test_pool.rb |