]> Sergey Matveev's repositories - public-inbox.git/commitdiff
qspawn: describe where `$rpipe' come from
authorEric Wong <e@80x24.org>
Mon, 24 Jun 2019 02:52:25 +0000 (02:52 +0000)
committerEric Wong <e@80x24.org>
Mon, 24 Jun 2019 05:26:26 +0000 (05:26 +0000)
It wasn't immediately obvious to me after several months of
not looking at this code.

lib/PublicInbox/Qspawn.pm

index 9aede103521b47d3684032ca29ac6ace7f0a1747..943ee8017908b657b7e441f11755b7abb18f5d56 100644 (file)
@@ -122,7 +122,7 @@ sub psgi_qx {
                eval { $qx_cb->($qx) };
                $qx = undef;
        };
-       my $rpipe;
+       my $rpipe; # comes from popen_rd
        my $async = $env->{'pi-httpd.async'};
        my $cb = sub {
                my $r = sysread($rpipe, my $buf, 8192);
@@ -137,7 +137,7 @@ sub psgi_qx {
        };
        $limiter ||= $def_limiter ||= PublicInbox::Qspawn::Limiter->new(32);
        $self->start($limiter, sub { # may run later, much later...
-               ($rpipe) = @_;
+               ($rpipe) = @_; # popen_rd result
                if ($async) {
                # PublicInbox::HTTPD::Async->new($rpipe, $cb, $end)
                        $async = $async->($rpipe, $cb, $end);