about summary refs log tree commit homepage
path: root/lib/PublicInbox/EvCleanup.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-24 02:52:22 +0000
committerEric Wong <e@80x24.org>2019-06-24 05:26:26 +0000
commitca05b93cddfa2cc495451410222af3753bfe1b4e (patch)
treea6a1b6c437341c82ab3545eeec926956ae76f05c /lib/PublicInbox/EvCleanup.pm
parentdbcdabe601cfb29c8b7d5f169be9bf560d656a42 (diff)
downloadpublic-inbox-ca05b93cddfa2cc495451410222af3753bfe1b4e.tar.gz
We don't need to keep track of that field since we always
know what events we're interested in when using one-shot
wakeups.
Diffstat (limited to 'lib/PublicInbox/EvCleanup.pm')
-rw-r--r--lib/PublicInbox/EvCleanup.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/EvCleanup.pm b/lib/PublicInbox/EvCleanup.pm
index d60ac2cc..a9f6167d 100644
--- a/lib/PublicInbox/EvCleanup.pm
+++ b/lib/PublicInbox/EvCleanup.pm
@@ -6,6 +6,7 @@ package PublicInbox::EvCleanup;
 use strict;
 use warnings;
 use base qw(PublicInbox::DS);
+use PublicInbox::Syscall qw(EPOLLOUT EPOLLONESHOT);
 
 my $ENABLED;
 sub enabled { $ENABLED }
@@ -59,13 +60,12 @@ sub _run_later () {
 # Called by PublicInbox::DS
 sub event_step {
         my ($self) = @_;
-        $self->watch_write(0);
         _run_asap();
 }
 
 sub _asap_timer () {
         $singleton ||= once_init();
-        $singleton->watch_write(1);
+        $singleton->watch(EPOLLOUT|EPOLLONESHOT);
         1;
 }