Backport #2488: thread usage can result in bad HANDLE
http://redmine.ruby-lang.org/issues/show/2488

Author: Roger Pack
Status: Open, Priority: Normal

require 'thwait'
loop {
 a = []
 10.times { a << Thread.new {}}
 ThreadsWait.all_waits(a)
 print '.'
}


C:\dev\digitalarchive_trunk>ruby -v
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mingw32]

C:\dev\digitalarchive_trunk>ruby stress_th.rb
.............[BUG] The handle is invalid.

ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mingw32]

-- control frame ----------
---------------------------
-- Ruby level backtrace information-----------------------------------------

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Works fine with 1.9.2

Thanks.
-r


----------------------------------------
http://redmine.ruby-lang.org