curl-library
Re: libcurl used in multiple components of an application
Date: Thu, 26 Mar 2009 14:00:03 +0100 (CET)
On Thu, 26 Mar 2009, Jamie Lokier wrote:
> So why not something like this in libcurl itself (use the platform
> equivalent of pthread_once_t):
Yeah, I've considered this in the past and given how this bites people over
and over again I think it would be worth giving it a try.
My primary objection against this has been for the added dependency and my
desire to avoid threads all together - coming from me being scared of threads
in general! But when applying logic and time on this, my objections have
erroded.
I've also seen people have problems when they combine two perfectly fine
libcurl-using programs to get done in two separate threads within a single
process only to cause sad faces.
Additionally, this could _also_ save the SSL library mutex setup problem at
the same time and enhance libcurl's API even in that aspect.
-- / daniel.haxx.seReceived on 2009-03-26