On Dec 25, 2007 5:58 PM, Luis Lavena <<a href="mailto:luislavena@gmail.com">luislavena@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Guys,<br><br>I'm reviewing the code for 1.9, and forgot about this when we first<br>spoke on this subject.<br><br>The current way we stop threads is using Thread#raise to spread<br>StopServer exception, which will not work as expected in
1.9.<br><br>1.9 will treat raised exceptions as #kill, like JRuby does, so the<br>worker threads will not finish serving the client and _then_ exiting,<br>but will be kill'ed in the middle of the request.<br><br>(at the bottom of
mongrel.rb):<br><a href="http://mongrel.rubyforge.org/svn/trunk/lib/mongrel.rb" target="_blank">http://mongrel.rubyforge.org/svn/trunk/lib/mongrel.rb</a><br><br>According to some docs of Jruby and YARV, we should rely on 'thread
<br>safety' of these methods (including #critical and #kill).<br><br>Thoughts?<br><br>btw, merry Christmas to everybody! :-D<br>--<br>Luis Lavena<br>Multimedia systems</blockquote><div><br>Merry Christmas and happy holidays all!!!
<br><br>Perhaps we should implement a check when Mongrel is loaded which sets a variable based on platform / ruby version for which Thread method to call for stop server handling. Then at the point where we stop threads we can .send() the method stored in the variable.
<br><br> ~Wayne<br> </div></div>