ruby thread programming , ruby equivalent of java wait/notify/notifyAll
问题 I would like to know what are ruby's alternatives to the Java methods : wait notify notifyAll Could you please post a small snippet or some links ? 回答1: With the caveat that I don't know Java, based on your comments, I think that you want a condition variable. Google for "Ruby condition variable" comes up with a bunch of useful pages. The first link I get, seems to be a nice quick introduction to condition vars in particular, while this looks like it gives a much broader coverage of threaded