git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times

From
Daniel Stenberg <daniel@haxx.se>
Date
Jun 19, 2013, 07:40 UTC
Message-ID
<alpine.DEB.2.00.1306190927020.23103@tvnag.unkk.fr>
In-Reply-To
<20130618221327.GA14234@sigill.intra.peff.net>
On Tue, 18 Jun 2013, Jeff King wrote:
Show 6 quoted lines
>> But, I don't know if there is any multi-processing happening within the 
>> curl library.
>
> I don't think curl does any threading; when we are not inside 
> curl_*_perform, there is no curl code running at all (Daniel can correct me 
> if I'm wrong on that).

Correct, that's true. The default setup of libcurl never uses any threading at all, everything is done using non-blocking calls and state-machines.

There's but a minor exception, so let me describe that case just to be perfectly clear:

When you've build libcurl with the "threaded resolver" backend, libcurl fires up a new thread to resolve host names with during the name resolving phase of a transfer and that thread can then actually continue to run when curl_multi_perform() returns.

That's however very isolated, stricly only for name resolving and there should be no way for an application to mess that up. Nothing of what you've discussed in this thread would affect or harm that thread. The biggest impact it tends to have on applications (that aren't following the API properly or assume a little too much) is that it changes the nature of what file descriptors to wait for slightly during the name resolve phase.

Some Linux distros ship their default libcurl builds using the threaded resolver.

-- 
  / daniel.haxx.se
Previous: Jeff King
Message 11 of 11 in “http.c: don't rewrite the user:passwd string multiple times”
  1. http.c: don't rewrite the user:passwd string multiple timesBrandon Casey, Jun 18, 2013
  2. Eric SunshineJun 18, 2013
  3. Jeff KingJun 18, 2013
  4. Daniel StenbergJun 18, 2013
  5. Junio C HamanoJun 18, 2013
  6. Brandon CaseyJun 18, 2013
  7. Jeff KingJun 18, 2013
  8. Brandon CaseyJun 19, 2013
  9. http.c: don't rewrite the user:passwd string multiple timesBrandon Casey, Jun 19, 2013
  10. Jeff KingJun 19, 2013
  11. Daniel StenbergJun 19, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.