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 5/6] http: drop unused `$env' variable after delete
  2019-09-17  8:31  6% [PATCH 0/6] qspawn-related cleanups, comments, and minor fix Eric Wong
@ 2019-09-17  8:31  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-09-17  8:31 UTC (permalink / raw)
  To: meta

And explain why we need to do that delete in a comment.
---
 lib/PublicInbox/HTTP.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm
index b43ef87..cd95f4a 100644
--- a/lib/PublicInbox/HTTP.pm
+++ b/lib/PublicInbox/HTTP.pm
@@ -255,7 +255,7 @@ sub next_request ($) {
 sub response_done_cb ($$) {
 	my ($self, $alive) = @_;
 	sub {
-		my $env = delete $self->{env};
+		delete $self->{env}; # we're no longer busy
 		$self->write(\"0\r\n\r\n") if $alive == 2;
 		$self->write($alive ? \&next_request : \&close);
 	}
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/6] qspawn-related cleanups, comments, and minor fix
@ 2019-09-17  8:31  6% Eric Wong
  2019-09-17  8:31  7% ` [PATCH 5/6] http: drop unused `$env' variable after delete Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-09-17  8:31 UTC (permalink / raw)
  To: meta

Still haven't found anything which is causing problems on korg,
but found a bunch of worthwhile cleanups, clarifications
and perhaps minor efficiency improvements that I'm comfortable
putting on 'master'.

Eric Wong (6):
  qspawn: remove return value from ->finish
  qspawn: log errors for generic PSGI server users
  qspawn: shorten lifetime of circular references
  qspawn: improve variable naming and commenting
  http: drop unused `$env' variable after delete
  http: remove unnecessary delete

 lib/PublicInbox/GitHTTPBackend.pm |  2 +-
 lib/PublicInbox/HTTP.pm           |  6 ++--
 lib/PublicInbox/Qspawn.pm         | 48 ++++++++++++-------------------
 t/qspawn.t                        | 17 +++++++----
 4 files changed, 33 insertions(+), 40 deletions(-)

-- 
EW


^ 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 --
2019-09-17  8:31  6% [PATCH 0/6] qspawn-related cleanups, comments, and minor fix Eric Wong
2019-09-17  8:31  7% ` [PATCH 5/6] http: drop unused `$env' variable after delete 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).