curl-library
Re: HTTPS and Multi-threading
Date: Tue, 8 Jun 2004 23:32:11 +0200 (CEST)
On Tue, 8 Jun 2004, Olano, Ever wrote:
> 1. In the guide, it says "When using multiple threads you should first
> ignore SIGPIPE in your main thread and set the CURLOPT_NOSIGNAL option to
> TRUE for all handles." How do I ignore SIGPIPE in my main thread? (I warned
> you about newbie stuff). Or is that still needed?
I don't think so, that info is slightly outdated. On most platforms libcurl
should inhibit the SIGPIPE.
> I'm actually building a C library for our customers. So the main thread
> would be theirs, unfortunately. Do library providers usually ask their
> customers to do this in their app?
I don't know.
> 2. What would not enabling ares-support exactly cause?
You won't be able to do name resolve timeouts accurately.
> If I don't have ares-support enabled and dns-resolves take too long, would
> the application hang?
Yes.
> Or would it crash?
No.
> What exactly happens?
ares is the way we do asynch name resolves. Without asynch we use synch. If a
synchronous name resolve call takes a long time, it won't return until that
time has passed (since cancelling it would require the use of a signal). It
hangs until done.
> Do people usually find themselves building with ares-support?
I would estimate that most people don't.
> 3. If I enable ares-support, do I need to download and build ares myself or
> is it included in curl.
You download, build and install it separately first. Then you build curl and
enable ares-support.
> 5. Have you or anyone tried using the sample code in mttest.c?
What's that?
> 6. It seems I have to set these callback functions in the main thread too
> (before any threads are spawned, I guess). Again, my problem is that I'm
> building a library to be used by our customers. Should I make them set
> these in their code?
Possibly, it pretty much depends on what API you provide to your customers.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-06-08