From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS33070 50.56.128.0/17 X-Spam-Status: No, score=0.0 required=3.0 tests=AWL,MSGID_FROM_MTA_HEADER, TVD_RCVD_IP shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: "Lin Jen-Shin (godfat)" Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: [PATCH] close_connection_after_writing only if not deferred, as in cool.io Date: Wed, 19 Dec 2012 06:20:22 +0800 Message-ID: References: <20121218214538.GA12275@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1355869266 28594 80.91.229.3 (18 Dec 2012 22:21:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Dec 2012 22:21:06 +0000 (UTC) To: "Rainbows! list" Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Tue Dec 18 23:21:21 2012 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=godfat.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Ty5AMWG3ioA1vLq3j6XJtrz9O1tOlLkffQw2sMMlPyo=; b=vyGlY9tk3+OCfb/gmqpLTGditiEJzSzHtYX0Oeu2gR+hkP760/tEqnmJ0G19s65Cbf HEKTOzsw+GqTZhJZm5bVpmORnhccXOK4glODWpNX9D1t/FMsoLEYN0HvDAg4VUpx8jZr j79HojtlbYO9ArXTC9DvFKDjA2AQt1YEU5cEA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=Ty5AMWG3ioA1vLq3j6XJtrz9O1tOlLkffQw2sMMlPyo=; b=hR8AjDv7dwH9+RdcSBHkWoVHeGlkfhGipOW/iHQyoO1FyKB7q4WM4mJi7wm/xidqRl 4PkkeQG8pq3tZEWOtvpq+jq3Uek0QhCfF5af+J0yxBh9X9cA34653TBerQa/BoU8+Ums 1ou+32oJUfpchB6+JhAXF0DbPn4yXrKYPiW2Ohyo41Rs3NLHkdFoR5EqbFNmYqU7hPfV onn6UtmNzC/KAWORP4GzQ6XticEDNUVSljXWOJOvUOkuN875mofkULvg90Zmpn6x87lx 6vNZgsAmlPdiWfJnjLyipRcU2xFQ8LJWcXkl5RuWEuAcy2vVEzC/BRsl+yaYTbDf/dxq SUpQ== In-Reply-To: <20121218214538.GA12275-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> X-Gm-Message-State: ALoCoQkzK/bRpGD+Z4VMQTI5CTnuuHNFQYKTGcv4TDPBszp88DF+/h0I0UQcKV6Ud7rH0foART2n X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:424 Archived-At: Received: from 50-56-192-79.static.cloud-ips.com ([50.56.192.79] helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tl5XH-0006Ov-CP for gclrrg-rainbows-talk@m.gmane.org; Tue, 18 Dec 2012 23:21:15 +0100 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 0E2652E07B; Tue, 18 Dec 2012 22:21:01 +0000 (UTC) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by rubyforge.org (Postfix) with ESMTP id 1A3C92E075 for ; Tue, 18 Dec 2012 22:20:54 +0000 (UTC) Received: by mail-la0-f42.google.com with SMTP id s15so1055905lag.29 for ; Tue, 18 Dec 2012 14:20:52 -0800 (PST) Received: by 10.112.87.194 with SMTP id ba2mr1503148lbb.84.1355869252268; Tue, 18 Dec 2012 14:20:52 -0800 (PST) Received: by 10.114.24.130 with HTTP; Tue, 18 Dec 2012 14:20:22 -0800 (PST) On Wed, Dec 19, 2012 at 5:45 AM, Eric Wong wrote: > Heh, I gave that a shot way back in the day but never got it working > to my satisfaction. Perhaps your fix is what is needed... Glad to know that. Hope this time we could reach your satisfaction :P I have some hard time running the test suites though :( I can't even pass all tests without any of my patches with: make EventMachine This works better, but still cannot pass everything: make -j8 EventMachine My linux crashed at the moment, and I am too lazy to fix it right now, thus running tests on my mac. I'll try to make sure that both EventMachine and EventMachineThreadSpawn fail on the same tests before sending the patch. Hope this would be good enough. I'll continue to work on EventMachineThreadPool and EventMachineFiberSpawn only if EventMachineThreadSpawn works. >> would need this to properly pass the tests. >> >> I think this would be needed while using >> `throw :async' as well? > > I don't think so, you just need to set @deferred=nil in a few places > before calling quit. I am not sure if we read it the same way, but what I mean is that if the application is using `throw :async', we still need the check in this patch to avoid dropping connections while receiving SIGQUIT. Thus even if EventMachineThreadSpawn is not included, we still need that check for regular EventMachine to quit gracefully for applications use `throw :async' But anyway, I still don't really understand all the details in Rainbows, so of course it's very likely that I am simply wrong :P > I've updated the patch and commit message. Will apply unless > you have objections: Thank you for the corrections and more explanation in the commit log. I am all for improving it, so credits don't really matter :) You could also change all the codes and logs in the patch, like fixing my broken English as well :P _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying