Hmm. Just being reading the Dr. Dobbs.

I certainly have hit the bottleneck talked about in this article...
   http://www.ddj.com/dept/architect/199902669
when using the 'thread.rb' Queue class.

I hacked around it by creating a Queue of Arrays, but that probably
creates more garbage than I should.

This "Spin Buffer" trick looks Good...
   http://www.ddj.com/dept/architect/199902669?pgno=2

Anyone have a ruby Spin Buffer implementation lying around?

John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter / tait.co.nz
New Zealand