cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Threading issues

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 8 Jan 2003 16:18:03 +0100 (MET)

On Tue, 7 Jan 2003, Jean-Philippe Barrette-LaPierre wrote:

> a read/write system lock is just a structure that use mutex and condition
> variable to be able to maximise the time that we can use the protected
> variable.

> If we don't use that, or we doen't offer the possibility to do that, there
> will be a bottleneck when we will use the global DNS cache.

We won't offer a global DNS cache. It'll be a shared object containing a DNS
cache. But yes, it will be a slight "bottleneck", but on the other hand we
get simpler code.

> The second possibility, the more simple for us, goes with an another
> parameter in the mutex callback function. The parameter will be the type of
> the access of the global dns cache.
>
> typedef int (*curl_mutex_func)
> (CURL *easy, curl_mutex id, void *clientp, int access_type );

Right, I follow you. I can't see any reason why we couldn't do this. All we
waste is one more argument in the callback.

So, let's adjust the prototype to accept an access type as well. I'll do
that.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Received on 2003-01-08