cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Easy handles & threads

From: Gisle Vanem <giva_at_bgnett.no>
Date: Wed, 28 Jul 2004 19:06:10 +0200

<choi_at_netlabs.org> said:

> "Got easy handle %X for thread %X", m_curlHandle, GetCurrentThreadId()
>
> which printed out the following list:
>
> Got easy handle 1C23530 for thread 1E4
> Got easy handle 1C2BD40 for thread 680 *
> Got easy handle 1C20018 for thread 5E0
> Got easy handle 1C2BD40 for thread 5E0 *
> Got easy handle 1C76030 for thread F40
> Got easy handle 1CA3040 for thread CAC
> Got easy handle 2C1E070 for thread 5E0
> Got easy handle 2C1DE90 for thread A6C
> Got easy handle 2C39028 for thread D30
> Got easy handle 2C73BF8 for thread CC8
>
> So, what I see is that the same handles are given out two times
> for different threads. This seems like a contradiction to the above
> statement of not sharing easy handles among different threads.

That is probably the reason why it crashed in Michaels threaded
version earlier. I never made it crash with his test program, so I
assumed it was an user-error.

Your report seems to indicate it has nothing to whether using threaded
DNS lookups or using C-ares. Maybe only that using C-ares hides the
problem or uses the heap differently.

Could you try changing the stack-size given in 2nd parameter of
_beginthreadex(). Or replace the function with CreateThread(). I originally
wrote it using CreateThread(), but someone complained that it could led
to trouble.

--gv
Received on 2004-07-28

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET