From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 07FB91F4BF for ; Mon, 24 Jun 2019 02:55:35 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 29/57] evcleanup: replace _run_asap with `event_step' callback Date: Mon, 24 Jun 2019 02:52:30 +0000 Message-Id: <20190624025258.25592-30-e@80x24.org> In-Reply-To: <20190624025258.25592-1-e@80x24.org> References: <20190624025258.25592-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: No point in keeping a one-line wrapper sub around. --- lib/PublicInbox/EvCleanup.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/PublicInbox/EvCleanup.pm b/lib/PublicInbox/EvCleanup.pm index a9f6167d..33b54ebc 100644 --- a/lib/PublicInbox/EvCleanup.pm +++ b/lib/PublicInbox/EvCleanup.pm @@ -46,7 +46,9 @@ sub _run_all ($) { # ensure PublicInbox::DS::ToClose processing after timers fire sub _asap_close () { $asapq->[1] ||= _asap_timer() } -sub _run_asap () { _run_all($asapq) } +# Called by PublicInbox::DS +sub event_step { _run_all($asapq) } + sub _run_next () { _run_all($nextq); _asap_close(); @@ -57,12 +59,6 @@ sub _run_later () { _asap_close(); } -# Called by PublicInbox::DS -sub event_step { - my ($self) = @_; - _run_asap(); -} - sub _asap_timer () { $singleton ||= once_init(); $singleton->watch(EPOLLOUT|EPOLLONESHOT); @@ -88,7 +84,7 @@ sub later ($) { } END { - _run_asap(); + event_step(); _run_all($nextq); _run_all($laterq); } -- EW