# File test/test_server.rb, line 158 def test_multi_access start = false lock = Mutex.new cond = ConditionVariable.new wait = proc{ lock.synchronize{ until (start) cond.wait(lock) end } } th_grp = ThreadGroup.new nconns = 16; nreqs = 32 nconns.times do th_grp.add(make_access_thread(nreqs, wait)) end lock.synchronize{ start = true cond.broadcast } for th in th_grp.list th.join end end