Ruby Semaphores?
问题 I'm working on an implementation of the "Fair Barbershop" problem in Ruby. This is for a class assignment, but I'm not looking for any handouts. I've been searching like crazy, but I cannot seem to find a Ruby implementation of Semaphores that mirror those found in C. I know there is Mutex, and that's great. Single implementation, does exactly what that kind of semaphore should do. Then there's Condition Variables. I thought that this was going to work out great, but looking at these, they