about summary refs log tree commit homepage
path: root/lib/PublicInbox/GitAsyncCat.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-11-26 02:11:04 +0000
committerEric Wong <e@80x24.org>2023-11-26 19:34:57 +0000
commit51b2fa7fb2b7b1caed8b1dde4613992a192225ed (patch)
tree2ca5f2161edc525a895223837e4455d4d9ed7646 /lib/PublicInbox/GitAsyncCat.pm
parente7f0919b6ec2e959444efb12af44658aa1ea9fb4 (diff)
downloadpublic-inbox-51b2fa7fb2b7b1caed8b1dde4613992a192225ed.tar.gz
While the {inflight} array should be tied to the IO object even
more tightly, that's not an easy task with our current code.  So
take some small steps by introducing a gcf_inflight helper to
validate the ownership of the process and to drain the inflight
array via the awaitpid callback.

This hopefully fix problems with t/lei-q-save.t (still) hanging
occasionally on v2 outputs since git->cleanup/->DESTROY was getting
called in v2 shard workers.
Diffstat (limited to 'lib/PublicInbox/GitAsyncCat.pm')
-rw-r--r--lib/PublicInbox/GitAsyncCat.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/GitAsyncCat.pm b/lib/PublicInbox/GitAsyncCat.pm
index f8b2a9fc..09744b34 100644
--- a/lib/PublicInbox/GitAsyncCat.pm
+++ b/lib/PublicInbox/GitAsyncCat.pm
@@ -40,7 +40,7 @@ sub ibx_async_prefetch {
         my ($ibx, $oid, $cb, $arg) = @_;
         my $git = $ibx->git;
         if (!defined($ibx->{topdir}) && $GCF2C) {
-                if (!@{$GCF2C->{inflight} // []}) {
+                if (!@{$GCF2C->gcf_inflight // []}) {
                         $oid .= " $git->{git_dir}\n";
                         return $GCF2C->gcf2_async($oid, $cb, $arg); # true
                 }