From: James Edward Gray II Date: 2006-02-14T01:47:08+09:00 Subject: Re: FasterGenerator (#66) On Feb 13, 2006, at 3:07 AM, Jesse Yoon wrote: > My solution was to get rid of SizedQueue and to use a Mutex and a > ConditionVariable to accomplish just that. At that point I saw Caleb's > solution and thought that starting and stopping a thead should be much > slower than using Mutexes and Cond_Vars. To my surprise, that > wasn't the > case. Mutex mechanism was much slower than Caleb's thread switching > solution. I'm pretty sure they learned the same lesson changing the standard library. Have a look at these commit messages: * lib/generator.rb: uses Mutex instead of Thread.critical. [ruby-dev:28184] Then later: Sorry, reverted. Mutex is damn slow..... :) James Edward Gray II