From: Marcelo Date: 2008-03-28T03:55:50+09:00 Subject: Re: How to kill a Thread into GServer "def server(io)" method? On Thu, Mar 27, 2008 at 11:31 AM, IƱaki Baz Castillo wrote: > The only way I get it working is doing: > > line = io.gets("\n") > Thread.current.terminate if !line # terminate = kill = exit Looking at the code in: http://ruby-doc.org/stdlib/libdoc/gserver/rdoc/classes/GServer.html#M000757 I think you can just return from the method and be happy. You can also raise an exception which will be caught and logged as an error if you set the debug attribute to a true value. Marcelo