curl-library
Re: libcurl and multithreading
Date: Thu, 22 Dec 2005 15:14:18 +0100
> > using only curl_easy_init, without calling curl_global_init first, is not
> > thread safe. when curl_easy_init is called twice concurrently, it seems
> > that both functions call curl_global_init, which makes the program crash
> > or getting into a deadlock or behave strange in some other way.
>
> Hm. Ok, I read you and I will of course add a note about this in the
> appropriate documentation, but do you know what particular thing that makes
> two simultaneous calls cause problems?
i can't tell which part exactly causes the problem, i haven't looked at the
libcurl sources.
i just found that calls to curl_easy_init often do not return when being
called simultaneously (pentium4-HT) or cause segmentation faults (or maybe
both), and i was unable to reproduce the errors when using valgrind.
calling curl_global_init explicitly fixed those errors apparently.
Received on 2005-12-22