On Oct 5, 2007, at 10:19 , MenTaLguY wrote:
> On Sat, 6 Oct 2007 00:48:01 +0900, Trevor Wennblom <trevor / umn.edu>  
> wrote:
>> Just installed Ruby 1.8.6-p110. There seems to be a bug related to
>> net/http, FastCGI, and Apache (1 or 2). I'm seeing this with a Rails-
>> based application that has no problems with Mongrel, Webrick,
>> Lighttpd, or Apache/CGI. This is on a Solaris environment, Ruby
>> compiled with GCC.
>
> I would strongly recommend against using timeout.rb: there is no
> way to write robust code with it because it can interrupt the block at
> any (i.e. the wrong) time, defeating normal cleanup/unwinding.

Not true.  You can always rescue the Timeout::Error and do proper  
cleanup.  It just takes work.  (This may be dependent upon the way  
ruby 1.8 checks to see if it should switch threads, which happens as  
you finish executing a node, not as you start it.)

See:

http://blog.segment7.net/articles/2006/04/11/care-and-feeding-of- 
timeout-timeout

And [ruby-talk:215086] and the rest of that thread.

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars