diff options
author | Eric Wong <e@80x24.org> | 2021-10-04 08:26:33 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-04 09:51:30 +0000 |
commit | 0f8cfbace2ab68aabfdfb6e9a06023043e943a67 (patch) | |
tree | a625e252b3ff78560aaf1998934c7f8c716b6f12 /lib/PublicInbox/DirIdle.pm | |
parent | 6248a7ab1046d0ccdc0b244099fb241fd52d653e (diff) | |
download | public-inbox-0f8cfbace2ab68aabfdfb6e9a06023043e943a67.tar.gz |
Both read(2) on inotify and kevent(2) return a finite amount of events. Let the kernel notify us again in cases where we'd need to retry instead of looping ourselves. This can prevent missed/delayed notifications while still ensuring fairness in busy event loops.
Diffstat (limited to 'lib/PublicInbox/DirIdle.pm')
-rw-r--r-- | lib/PublicInbox/DirIdle.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/DirIdle.pm b/lib/PublicInbox/DirIdle.pm index d572c274..c9a293e9 100644 --- a/lib/PublicInbox/DirIdle.pm +++ b/lib/PublicInbox/DirIdle.pm @@ -5,7 +5,7 @@ package PublicInbox::DirIdle; use strict; use parent 'PublicInbox::DS'; -use PublicInbox::Syscall qw(EPOLLIN EPOLLET); +use PublicInbox::Syscall qw(EPOLLIN); use PublicInbox::In2Tie; my ($MAIL_IN, $MAIL_GONE, $ino_cls); @@ -38,7 +38,7 @@ sub new { if ($ino_cls) { $inot = $ino_cls->new or die "E: $ino_cls->new: $!"; my $io = PublicInbox::In2Tie::io($inot); - $self->SUPER::new($io, EPOLLIN | EPOLLET); + $self->SUPER::new($io, EPOLLIN); } else { require PublicInbox::FakeInotify; $inot = PublicInbox::FakeInotify->new; # starts timer |