From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B84291FAE9 for ; Tue, 6 Mar 2018 08:42:42 +0000 (UTC) From: "Eric Wong (Contractor, The Linux Foundation)" To: meta@public-inbox.org Subject: [PATCH 07/34] evcleanup: do not create event loop if nothing was registered Date: Tue, 6 Mar 2018 08:42:15 +0000 Message-Id: <20180306084242.19988-8-e@80x24.org> In-Reply-To: <20180306084242.19988-1-e@80x24.org> References: <20180306084242.19988-1-e@80x24.org> List-Id: This was creating an unnecessary epoll descriptor via Danga::Socket when using V2Writable to import a mbox. That said, there should probably be better way of detecting whether or not we're inside a Danga::Socket event loop. Fixes: 427245acacaf04a8 ("evcleanup: ensure deferred close from timers are handled ASAP") --- lib/PublicInbox/EvCleanup.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/EvCleanup.pm b/lib/PublicInbox/EvCleanup.pm index 8ed5180..384efd3 100644 --- a/lib/PublicInbox/EvCleanup.pm +++ b/lib/PublicInbox/EvCleanup.pm @@ -79,8 +79,8 @@ sub later ($) { END { _run_asap(); - _run_next(); - _run_later(); + _run_all($nextq); + _run_all($laterq); } 1; -- EW