curl-library
Re: Re[4]: Threading and general usage in C++
Date: Sun, 22 Apr 2001 18:17:58 +0200 (MET DST)
On Sat, 21 Apr 2001, Gabriel Ambuehl wrote:
> Now to make things even worse: it sometimes will fetch the data the first
> time called (appears to be somehow related to the url used,
> http://localhost works this way, http://10.2.2.220 does not) and then
> crash with a segfault. If I set only the first thread to do the check, it
> will work like before having only one thread.
Doesn't FreeBSD have thread safe versions of the resolver functions? Does the
configure script detect and use the proper *_r functions? Besides, since it
warns about not being thread-safe, I figure that can be the problem here.
> I'm beginning to believe that I'd be better off with implementing a dummy
> HTTP(S) library myself for this purpose, after all, I don't need any
> sophisticated POST stuff etc. (Despite, I figured that this whole
> threading stuff has a way bigger CPU overhead than having different
> processes.
If you honestly think writing your own library is quicker than debugging the
problems you experience with libcurl, then go ahead.
You want my personal opinion? (Well, you're getting it anyway! :*) You'll
spend an awful lot of more time re-inventing this wheel than it would take to
track this problem down.
> > That might be because you pass a char pointer to libcurl that you
> > free or reuse before libcurl is done.
>
> This problem has gone (I've got my doubts about the maturity of this
> whole threading stuff).
I can't but agree.
-- Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/ _______________________________________________ Curl-library mailing list Curl-library_at_lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/curl-libraryReceived on 2001-04-22