]> Sergey Matveev's repositories - public-inbox.git/commit
lei: improve management around short-lived workers
authorEric Wong <e@80x24.org>
Tue, 23 Mar 2021 11:48:08 +0000 (11:48 +0000)
committerEric Wong <e@80x24.org>
Wed, 24 Mar 2021 01:33:26 +0000 (01:33 +0000)
commit97caa1fe259cd6904573f36e0ac078a269b6ec5f
tree1babb08442553884028f9177ce471188fbfd5c76
parentd39ff2cf4400b87bf6f51d7fe9f4b0e2a72bf679
lei: improve management around short-lived workers

Instead of creating a short-lived circular reference,
ensure they don't exist in the first place.

Note the following changes to hold an extra ref to $sto:

- $self->_lei_store(1)->write_prepare($self);
+ my $sto = $self->_lei_store(1);
+ $sto->write_prepare($self);

I'm not a perlguts expert, but I actually wanted to switch
to the one-line version for LeiImport, but xt/lei-auth-fail.t
was getting stuck for some reason.  It seems the extra ref
to the LeiStore ($sto) object is necessary.
lib/PublicInbox/LEI.pm
lib/PublicInbox/LeiConvert.pm
lib/PublicInbox/LeiExternal.pm
lib/PublicInbox/LeiImport.pm
lib/PublicInbox/LeiMark.pm
lib/PublicInbox/LeiMirror.pm
lib/PublicInbox/LeiP2q.pm
lib/PublicInbox/LeiQuery.pm