dv/redis-semaphore — pull request #4 by timgaleckas (2012-07-06 00:33:35+00:00)
Title: Add resource index to multiple resource semaphore

We want to use this as a cross process connection pool. The call needs to look something like:

multisem = Redis::Semaphore.new(:my_semaphore5_parallel, 5, @redis)
multisem.lock(1) do |i|
connection = Connection.new(config.users[i].username, config.users[i].password)
connectino.do_stuff
end