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 /t | |
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 't')
-rw-r--r-- | t/dir_idle.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/dir_idle.t b/t/dir_idle.t index 8e7f3b70..19e54967 100644 --- a/t/dir_idle.t +++ b/t/dir_idle.t @@ -9,7 +9,8 @@ my ($tmpdir, $for_destroy) = tmpdir(); make_path("$tmpdir/a/b", "$tmpdir/c"); my @x; my $cb = sub { push @x, \@_ }; -my $di = PublicInbox::DirIdle->new(["$tmpdir/a", "$tmpdir/c"], $cb, 1); +my $di = PublicInbox::DirIdle->new($cb); +$di->add_watches(["$tmpdir/a", "$tmpdir/c"], 1); PublicInbox::DS->SetLoopTimeout(1000); my $end = 3 + now; PublicInbox::DS->SetPostLoopCallback(sub { scalar(@x) == 0 && now < $end }); |