Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/2] http.c: Use curl_multi_fdset to select on curl fds instead of just sleeping

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:22

Jeff King [off-list ref] writes:
On Wed, Nov 02, 2011 at 04:32:21PM -0400, Jeff King wrote:
quoted
At least that's my reading. I am working on unrelated patches that clean
up the handling of data_received, but if it could go away altogether,
that would be even simpler.
That patch, btw, looks like this:

-- >8 --
Subject: [PATCH] http: remove "local" member from slot struct

The curl-multi http code does something like this:

  while (!finished) {
	  try_to_read_from_slots();
	  if (!data_received)
		  wait_for_50_ms();
  }

...
Let's do the same thing for the write-to-file case as we do
for the write-to-strbuf case: use a thin wrapper callback
and increment the received flag. This makes both methods
consistent with each other, and saves us from managing the
"local" struct member at all, reducing the code size.
Looks very sensible.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help