A synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes
MIT License
A synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes
gem install countdownlatch
require 'countdownlatch'
latch = CountDownLatch.new 2
Thread.new do
2.times do
sleep 1
latch.countdown!
end
end
latch.wait 10
Copyright (c) 2011 Ben Langfeld, Tuomas Kareinen. MIT licence (see LICENSE for details).