From: Eric Wong Date: Tue, 2 Feb 2021 11:47:00 +0000 (+0000) Subject: lei_overview: avoid unnecessary {l2m} delete X-Git-Tag: v1.7.0~1234 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=e6dd3e758902c8d1803e0ef4602a5cb24b5b8403;p=public-inbox.git lei_overview: avoid unnecessary {l2m} delete We may reuse these objects in the non-worker code paths. --- diff --git a/lib/PublicInbox/LeiOverview.pm b/lib/PublicInbox/LeiOverview.pm index 31cc67f1..ff15d295 100644 --- a/lib/PublicInbox/LeiOverview.pm +++ b/lib/PublicInbox/LeiOverview.pm @@ -147,10 +147,8 @@ sub _unbless_smsg { sub ovv_atexit_child { my ($self, $lei) = @_; - if (my $l2m = delete $lei->{l2m}) { - # gracefully stop lei2mail processes after all - # ->write_mail work is complete - delete $l2m->{-wq_s1}; + if (my $l2m = $lei->{l2m}) { + # wait for ->write_mail work we submitted to lei2mail if (my $rd = delete $l2m->{each_smsg_done}) { read($rd, my $buf, 1); # wait for EOF }