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-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 7D4051F5AE; Thu, 2 Jul 2020 19:50:52 +0000 (UTC) Date: Thu, 2 Jul 2020 19:50:51 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: [PATCH] inboxidle: avoid per-inbox anonymous subs Message-ID: <20200702195051.GA71258@dcvr> References: <20200702033256.15643-1-e@yhbt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200702033256.15643-1-e@yhbt.net> List-Id: Keeping comments and code synced is hard :x Will squash before pushing diff --git a/lib/PublicInbox/DirIdle.pm b/lib/PublicInbox/DirIdle.pm index 2915fd6e..89cce305 100644 --- a/lib/PublicInbox/DirIdle.pm +++ b/lib/PublicInbox/DirIdle.pm @@ -45,7 +45,7 @@ sub event_step { my ($self) = @_; my $cb = $self->{cb}; eval { - my @events = $self->{inot}->read; # Linux::Inotify2::poll + my @events = $self->{inot}->read; # Linux::Inotify2->read $cb->($_) for @events; }; warn "$self->{inot}->read err: $@\n" if $@; diff --git a/lib/PublicInbox/KQNotify.pm b/lib/PublicInbox/KQNotify.pm index 2305daa7..c7740df2 100644 --- a/lib/PublicInbox/KQNotify.pm +++ b/lib/PublicInbox/KQNotify.pm @@ -56,7 +56,7 @@ sub on_overflow {} # noop for Linux::Inotify2 compatibility, we use `0' timeout for ->kevent sub blocking {} -# behave like Linux::Inotify2::poll +# behave like Linux::Inotify2->read sub read { my ($self) = @_; my @kevents = $self->{dskq}->{kq}->kevent(0);