Actions
Bug #11642
closedThread List Example - Wrong Output
Bug #11642:
Thread List Example - Wrong Output
Description
http://ruby-doc.org/core-1.9.3/Thread.html
list → array click to toggle source
Returns an array of Thread objects for all threads that are either runnable or stopped.
Thread.new { sleep(200) }
Thread.new { 1000000.times {|i| i*i } }
Thread.new { Thread.stop }
Thread.list.each {|t| p t}
produces:
WRONG:
RIGHT:
Actions