From f64adbd5e3c35197c1915bca108cdcd81f74f708 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 16 Oct 2021 01:00:53 +0000 Subject: 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. --- lib/PublicInbox/LEI.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/LEI.pm') diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 7dfd3398..a526a91f 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -1305,10 +1305,11 @@ sub lazy_start { USR2 => \&noop, }; require PublicInbox::DirIdle; - local $dir_idle = PublicInbox::DirIdle->new([$sock_dir], sub { + local $dir_idle = PublicInbox::DirIdle->new(sub { # just rely on wakeup to hit PostLoopCallback set below dir_idle_handler($_[0]) if $_[0]->fullname ne $path; - }, 1); + }); + $dir_idle->add_watches([$sock_dir]); PublicInbox::DS->SetPostLoopCallback(sub { my ($dmap, undef) = @_; if (@st = defined($path) ? stat($path) : ()) { -- cgit v1.2.3-24-ge0c7