I'm not entirely certain how it works with the way we use kevent. I do know IO::KQueue has hard-coded kevent retrievals to 1000 events so it's conceivable we'd end up missing wakeups as we don't loop or requeue in callers. So just rely on the *BSD kernel to provided requeue behavior for us by using level-triggering.
In any case, this seems to workaround t/dir_idle.t failures on Dragonfly due to a tmpfs bug in all versions up to v6.4. --- lib/PublicInbox/KQNotify.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/KQNotify.pm b/lib/PublicInbox/KQNotify.pm index 2efa887d..1689f4cc 100644 --- a/lib/PublicInbox/KQNotify.pm +++ b/lib/PublicInbox/KQNotify.pm @@ -26,7 +26,7 @@ sub watch { my $ident = fileno($w->[2]) // die "BUG: bad fileno $w->[2]: $!"; $self->{dskq}->{kq}->EV_SET($ident, # ident (fd) EVFILT_VNODE, # filter - EV_ADD | EV_CLEAR, # flags + EV_ADD, # flags $mask, # fflags 0, $dir_delete); # data, udata $self->{watch}->{$ident} = $w;