curl-library
Re: libcurl with pthreads-win Was: what is the best way to preform http post request every N seconds endlessly
Date: Fri, 4 Apr 2008 22:27:49 +0200
hello and thanks for the reply , can you please explain me what is c-ares
and how you got to this conclusion?
so i could learn .
thanks
On Fri, Apr 4, 2008 at 8:25 PM, Yang Tse <yangsita_at_gmail.com> wrote:
> 2008/4/2, Meir Yanovich wrote:
>
> > im working with pthreads and the http request is invoked in separate
> > thread the problem is
> > that when im using threads when it comes to execute the cUrl api
> > "curl_easy_perform"
> > im getting error ( the one kind that just to the assembly ) and the
> > call stuck looks like this :
> > NTDLL! 77fa144b()
> > NTDLL! 77fb6bcc()
> > NTDLL! 77f81d44()
> > KERNEL32! 7c4fb252()
> > _CrtIsValidHeapPointer(const void * 0x00992dc0) line 1606
> > _free_dbg_lk(void * 0x00992dc0, int 1) line 1011 + 9 bytes
> > _free_dbg(void * 0x00992dc0, int 1) line 970 + 13 bytes
> > free(void * 0x00992dc0) line 926 + 11 bytes
> > destroy_thread_sync_data(thread_sync_data * 0x00b9ff70) line 183 + 15 bytes
> > gethostbyname_thread(void * 0x00881140) line 321 + 9 bytes
> > _threadstartex(void * 0x00882cd0) line 212 + 13 bytes
> > KERNEL32! 7c4e987c()
>
> Since there is a call to gethostbyname_thread() this indicates that
> you've built libcurl with the "Windows threaded name resolver" which
> is the default configuration. This implies that some Windows native
> thread functions will be used when resolving hosts.
>
> Mixing Windows native thread functions with pthreads-win's threads in
> the same executable might be generating the error you've stack traced.
>
> You can get rid of the Windows native thread function calls building
> libcurl with c-ares which should be safer when using pthreads-win.
> Otherwise you'll have to get your sleeves up and dig into libcurl's
> hostthre.c and all the pthreads-win code.
>
> --
> -=[Yang]=-
>
Received on 2008-04-04