cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [ANN] libproxy 0.2

From: Nathaniel McCallum <npmccallum_at_gmail.com>
Date: Fri, 21 Dec 2007 09:42:42 -0500

On Dec 21, 2007 5:43 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Thu, 20 Dec 2007, Nathaniel McCallum wrote:
>
> > 1. there are only three functions in the external API
> > 2. the header is well commented
> > 3. we have a HowTo section with code examples on the website
> >
> > I'm happy to take any suggestions on how we can improve this.
>
> Ah, reading the header I then found a new reason to avoid this library in
> libcurl:
>
> "This instance and all its methods are NOT thread safe"
>
> There's just no way I can accept letting in code (for generic modern
> platforms) in libcurl that isn't thread safe, or possible to make thread safe
> with mutex callbacks etc.

Adding thread support is our plan, we just needed to hammer out the
design first. However, currently if a pxProxyFactory instance is only
in one thread, it is safe (we use no globals). The only issue is
trying to simultaneously use the same pxProxyFactory instance across
multiple threads. Adding thread support should be simple as there is
only one function where thread contention can occur,
px_proxy_factory_get_proxies().

> > I just released 0.2.1 to fix a build issue, I hope it was yours. Please
> > provide me with details and I'll gladly fix whatever issues you are having.
>
> Yeps, this version runs configure and builds fine, thanks! The only downside
> is that for some reason it only builds the envvar and file plugins for me,
> even though I use both Firefox and Gnome and I figure it should use them too?
>
> BTW, what is the file plugin? What file does it check for proxy info?

It currently checks ~/.proxy.conf for proxy config and /etc/proxy.conf
for proxy config and plugin priority (allowing administrators to lock
in a specific config).

I should point out that while our API is stable, our internals are
not, so this detail might change.

Nathaniel
Received on 2007-12-21