Bugs item #3149, was opened at 2005-12-30 11:24
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3149&group_id=426

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Jeong-Min Lee (falsetru)
Assigned to: Nobody (None)
Summary: deadlock on Generator#next?

Initial Comment:
Here what I've got.
-------------------------------------------
falsetru@lj:~$ cat deadlock.rb
require 'generator'

while true
  gen = Generator.new { |g| }
  gen.next while gen.next? # consume all
  #puts File.readlines('/proc/self/status').select { |line| line =~ /VmSize/ }
end
falsetru@lj:~$ ruby deadlock.rb
deadlock 0xb7de58ec: sleep:- (main) - /usr/local/lib/ruby/1.9/generator.rb:108
deadlock 0xb7dc0c68: sleep:-  - /usr/local/lib/ruby/1.9/generator.rb:75
/usr/local/lib/ruby/1.9/generator.rb:75:in `end?': Thread(0xb7dc0c68): deadlock (fatal)
        from /usr/local/lib/ruby/1.9/generator.rb:121:in `next?'
        from deadlock.rb:5
falsetru@lj:~$ uname -srv
Linux 2.6.12-10-686 #1 Thu Dec 22 11:55:07 UTC 2005
falsetru@lj:~$ ruby -v
ruby 1.9.0 (2005-12-30) [i686-linux]
falsetru@lj:~$ 
-------------------------------------------


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3149&group_id=426