curl-library
Re: libcurl and threading
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 25 Jun 2003 23:24:22 +0200 (CEST)
Date: Wed, 25 Jun 2003 23:24:22 +0200 (CEST)
On Wed, 25 Jun 2003, Wei Weng wrote:
> I have this application I am working on that spawns multiple threads, and
> some of those threads use libcurl and some others have nothing to do with
> libcurl at all.
>
> Can I do curl_global_init() in each of those threads? (for modulization's
> sake)
I think the man page is pretty clear on this:
This function should only be called once (no matter how many
threads or libcurl sessions that'll be used) by every appli
cation that uses libcurl.
So the answer would be: no, don't do that.
-- Daniel Stenberg -- curl: been grokking URLs since 1998 ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.phpReceived on 2003-06-25