- eval { $self->{inot}->poll }; # Linux::Inotify2::poll
- warn "$self->{inot}->poll err: $@\n" if $@;
+ my $cb = $self->{cb};
+ local $PublicInbox::DS::in_loop = 0; # waitpid() synchronously
+ eval {
+ my @events = $self->{inot}->read; # Linux::Inotify2->read
+ $cb->($_) for @events;
+ };
+ warn "$self->{inot}->read err: $@\n" if $@;