diff options
author | Eric Wong <e@80x24.org> | 2023-01-30 04:30:57 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-01-30 06:42:42 +0000 |
commit | 7b654d175cf2e31b4354929ea678563f534947e5 (patch) | |
tree | 3dcfb9dfc38e005c5aeeb6e673968610e6393e91 /lib/PublicInbox/LEI.pm | |
parent | f9557e2c6b7510d278310066fe7c26f84cae6e1d (diff) | |
download | public-inbox-7b654d175cf2e31b4354929ea678563f534947e5.tar.gz |
This brings t/lei-index.t back down from ~8 to ~3s. I didn't notice this before was because the LeiNoteEvent timer was firing every 5s and clearing circular refs and parallel testing meant the delay got hidden. Fixes: 4a2a95bbc78f99c8 (ipc+lei: switch to awaitpid, 2023-01-17)
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 6ad42111..ffd50db5 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -643,8 +643,8 @@ sub workers_start { my $end = $lei->pkt_op_pair; my $ident = $wq->{-wq_ident} // "lei-$lei->{cmd} worker"; $flds->{lei} = $lei; - $wq->awaitpid_init($wq->can('_wq_done_wait') // \&wq_done_wait, $lei); - $wq->wq_workers_start($ident, $jobs, $lei->oldset, $flds); + $wq->wq_workers_start($ident, $jobs, $lei->oldset, $flds, + $wq->can('_wq_done_wait') // \&wq_done_wait, $lei); delete $lei->{pkt_op_p}; my $op_c = delete $lei->{pkt_op_c}; @$end = (); @@ -1390,7 +1390,7 @@ sub DESTROY { # preserve $? for ->fail or ->x_it code } -sub wq_done_wait { # awaitpid cb (via wq_eof / IPC->awaitpid_init) +sub wq_done_wait { # awaitpid cb (via wq_eof) my ($pid, $wq, $lei) = @_; local $current_lei = $lei; my $err_type = $lei->{-err_type}; |