Robert Gleeson wrote:
> Hi,
> 
> I would guess your culprit for the spike to 100% CPU usage may be your 
> infinite loop:
> 
> 
>>      until @stopped
>>        yield
>>        Thread.stop if @paused
>>      end
> 
> Look at using sleep() if you want to decrease CPU usage. Even sleeping 
> for one second should decrease your CPU usage dramatically in my 
> experience(maybe with a rare spike).

Sure, i got this code from the Oreilly Ruby Cookbook. Is it bad code 
then?
Again this doesn't happen when i use similar code in Java...
-- 
Posted via http://www.ruby-forum.com/.