]> Sergey Matveev's repositories - public-inbox.git/commitdiff
evcleanup: replace _run_asap with `event_step' callback
authorEric Wong <e@80x24.org>
Mon, 24 Jun 2019 02:52:30 +0000 (02:52 +0000)
committerEric Wong <e@80x24.org>
Mon, 24 Jun 2019 05:26:26 +0000 (05:26 +0000)
No point in keeping a one-line wrapper sub around.

lib/PublicInbox/EvCleanup.pm

index a9f6167dff25c9054ef83a3b81c27f76cf8d847f..33b54ebc05fb6ef0c7af0d1cbbba7d1378e805e5 100644 (file)
@@ -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);
 }