* [PATCH] lei up: only show finmsg in top-level lei-daemon
@ 2021-08-31 19:38 7% Eric Wong
0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2021-08-31 19:38 UTC (permalink / raw)
To: meta
->DESTROY can get triggered in child processes, which
unnecessarily duplicates messages queued up for display
when lei spawns extra workers.
---
lib/PublicInbox/LeiFinmsg.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/LeiFinmsg.pm b/lib/PublicInbox/LeiFinmsg.pm
index 0ef5f070..395e7d3c 100644
--- a/lib/PublicInbox/LeiFinmsg.pm
+++ b/lib/PublicInbox/LeiFinmsg.pm
@@ -9,13 +9,13 @@ use v5.10.1;
sub new {
my ($cls, $io) = @_;
- bless [ $io ], $cls;
+ bless [ $io, $$ ], $cls;
}
sub DESTROY {
my ($self) = @_;
my $io = shift @$self;
- print $io @$self;
+ shift(@$self) == $$ and print $io @$self;
}
1;
^ permalink raw reply related [relevance 7%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-08-31 19:38 7% [PATCH] lei up: only show finmsg in top-level lei-daemon Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).