user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 1/4] githttpbackend: minor readability improvement
  2016-12-25 10:36  6% [PATCH 0/4] various cleanups around http Eric Wong
@ 2016-12-25 10:36  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-12-25 10:36 UTC (permalink / raw)
  To: meta

Use a more meaningful variable name for the Qspawn
object, since this module is the reference for its
use.
---
 lib/PublicInbox/GitHTTPBackend.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm
index a069fd9..86b8ebc 100644
--- a/lib/PublicInbox/GitHTTPBackend.pm
+++ b/lib/PublicInbox/GitHTTPBackend.pm
@@ -206,11 +206,11 @@ sub serve_smart {
 	}
 	$env{GIT_HTTP_EXPORT_ALL} = '1';
 	$env{PATH_TRANSLATED} = "$git_dir/$path";
-	my %rdr = ( 0 => fileno($in) );
-	my $x = PublicInbox::Qspawn->new([qw(git http-backend)], \%env, \%rdr);
+	my $rdr = { 0 => fileno($in) };
+	my $qsp = PublicInbox::Qspawn->new([qw(git http-backend)], \%env, $rdr);
 	my ($fh, $rpipe);
 	my $end = sub {
-		if (my $err = $x->finish) {
+		if (my $err = $qsp->finish) {
 			err($env, "git http-backend ($git_dir): $err");
 		}
 		$fh->close if $fh; # async-only
@@ -258,7 +258,7 @@ sub serve_smart {
 		# holding the input here is a waste of FDs and memory
 		$env->{'psgi.input'} = undef;
 
-		$x->start($limiter, sub { # may run later, much later...
+		$qsp->start($limiter, sub { # may run later, much later...
 			($rpipe) = @_;
 			$in = undef;
 			if ($async) {
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/4] various cleanups around http
@ 2016-12-25 10:36  6% Eric Wong
  2016-12-25 10:36  7% ` [PATCH 1/4] githttpbackend: minor readability improvement Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2016-12-25 10:36 UTC (permalink / raw)
  To: meta

Eric Wong (4):
      githttpbackend: minor readability improvement
      githttpbackend: simplify compatibility code
      githttpbackend: minor cleanups to improve readability
      httpd/async: improve variable naming

 examples/public-inbox.psgi        |  1 +
 lib/PublicInbox/GitHTTPBackend.pm | 41 +++++++++++++++++----------------------
 lib/PublicInbox/HTTPD/Async.pm    | 14 ++++++-------
 3 files changed, 26 insertions(+), 30 deletions(-)

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-12-25 10:36  6% [PATCH 0/4] various cleanups around http Eric Wong
2016-12-25 10:36  7% ` [PATCH 1/4] githttpbackend: minor readability improvement 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).