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.
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;