From: Lars Christensen Date: 2002-05-27T21:12:35+09:00 Subject: SizedQueue.new(0) --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Is this a bug in Ruby or my brain? :-) $ sizedqueue.rb=20 quire 'thread.rb' q =3D SizedQueue.new(0) Thread.start { q.pop } q.push 1=20 $ ruby sizedqueue.rb=20 deadlock 0x80fb99c: 2:0 - /pack/ruby-1.6.7/lib/ruby/1.6/thread.rb:184 deadlock 0x8105d98: 2:0 (main) - /pack/ruby-1.6.7/lib/ruby/1.6/thread.rb:253 /pack/ruby-1.6.7/lib/ruby/1.6/thread.rb:253:in `stop': Thread: deadlock (fa= tal) from /pack/ruby-1.6.7/lib/ruby/1.6/thread.rb:253:in `push' from sizedqueue.rb:4 Or is there an easier way to do job/thread multiplexing without a queue? I.= e. to have all pushers block until someone pops. --=20 Lars Christensen --CE+1k2dSO48ffgeK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (SunOS) Comment: For info see http://www.gnupg.org iD8DBQE88iKqu9sWhhA5M0gRAkj9AJ9uaF+u046KRQs/AeKUfE7aF3MVuQCbBI2M pwHiWg8SdaZEUPaXZS14JKE= =A+ro -----END PGP SIGNATURE----- --CE+1k2dSO48ffgeK--