From: James Gray Date: 2009-08-02T00:57:17+09:00 Subject: Re: Timeout errors using Net::HTTP on Windows On Aug 1, 2009, at 7:05 AM, Roger Pack wrote: >> For posterity: as described and discussed here: >> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/229801 >> it turns out that threads and I/O don't mix in the One-Click >> Installer >> at this time. Neither, apparently, do they mix in the MinGW builds... > > I don't think this was the root cause, however--the problem described > here is that if you have nested timeout's > Timeout.timeout(x) { > begin > Timeout.timeout(y) { stuff } > rescue Timeout::Error > # which timeout will cause this to trigger? > end > } > > The outermost timeout could timeout the inner one, causing the inner > one > to think it was "timed out" when it wasn't--the outer one was. For information about how to correctly nest timeout() calls, please see: http://blog.segment7.net/articles/2006/04/11/care-and-feeding-of-timeout-timeout James Edward Gray II