From f41dc46f6213661ba51443d6cb0d6a9ba4d41472 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 24 Jun 2019 02:52:18 +0000 Subject: ds: set event flags directly at initialization We can avoid the EPOLL_CTL_ADD && EPOLL_CTL_MOD sequence with a single EPOLL_CTL_ADD. --- lib/PublicInbox/ParentPipe.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/PublicInbox/ParentPipe.pm') diff --git a/lib/PublicInbox/ParentPipe.pm b/lib/PublicInbox/ParentPipe.pm index a9f05fc1..ccc0815e 100644 --- a/lib/PublicInbox/ParentPipe.pm +++ b/lib/PublicInbox/ParentPipe.pm @@ -10,9 +10,8 @@ use fields qw(cb); sub new ($$$) { my ($class, $pipe, $cb) = @_; my $self = fields::new($class); - $self->SUPER::new($pipe); + $self->SUPER::new($pipe, PublicInbox::DS::EPOLLIN()); $self->{cb} = $cb; - $self->watch_read(1); $self; } -- cgit v1.2.3-24-ge0c7