diff options
author | Eric Wong <e@80x24.org> | 2021-10-16 01:00:53 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-16 01:42:48 +0000 |
commit | f64adbd5e3c35197c1915bca108cdcd81f74f708 (patch) | |
tree | 3e5d4e17d758ac0af766685508b84cad8660f438 /lib/PublicInbox/DirIdle.pm | |
parent | 879547527204b878b80804c2f19c6ef71458194e (diff) | |
download | public-inbox-f64adbd5e3c35197c1915bca108cdcd81f74f708.tar.gz |
dir_idle: do not add watches in ->new
There's no savings in having two ways to add watches to an inotify nor kqueue descriptor.
Diffstat (limited to 'lib/PublicInbox/DirIdle.pm')
-rw-r--r-- | lib/PublicInbox/DirIdle.pm | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/PublicInbox/DirIdle.pm b/lib/PublicInbox/DirIdle.pm index c9a293e9..270d3829 100644 --- a/lib/PublicInbox/DirIdle.pm +++ b/lib/PublicInbox/DirIdle.pm @@ -32,7 +32,7 @@ if ($^O eq 'linux' && eval { require Linux::Inotify2; 1 }) { } sub new { - my ($class, $dirs, $cb, $gone) = @_; + my ($class, $cb) = @_; my $self = bless { cb => $cb }, $class; my $inot; if ($ino_cls) { @@ -43,13 +43,7 @@ sub new { require PublicInbox::FakeInotify; $inot = PublicInbox::FakeInotify->new; # starts timer } - - # Linux::Inotify2->watch or similar - my $fl = $MAIL_IN; - $fl |= $MAIL_GONE if $gone; - $inot->watch($_, $fl) for @$dirs; $self->{inot} = $inot; - PublicInbox::FakeInotify::poll_once($self) if !$ino_cls; $self; } |