cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re[2]: gethostbyname_thread: Access Violation

From: Igor Polyakov <ipolyakov_at_issart.com>
Date: Mon, 22 Aug 2005 16:20:18 +0700

Hello, Daniel,

Monday, August 22, 2005, 3:53:25 PM, you wrote:

>> As I understand, libcurl creates additional thread to resolve host name on
>> first calls to curl_multi_perform, but neither curl_easy_cleanup, nor
>> curl_multi_cleanup functions do not terminate the thread.
> Isn't that what Curl_destroy_thread_data() does? It is called when a
> connection is disconnected.
Curl_destroy_thread_data is called in my code from curl_easy_cleanup,
I have checked it using breakpoint. td->thread_id within Curl_destroy_thread_data
had value equal to the second thread id. I see that this function do
some cleanup, but I feel it does not wait until second thread
terminates...

>> May be there is an incorrect use of libcurl API in this code, please point
>> me, where ? Or is it a bug in this version of libcurl ?
> Even if you'd use it wrongly, we shouldn't allow an access violation. But I
> don't think you've done anything wrong here...
Hm, could you suggest any workaround here ?

-- 
Best regards,
 Igor Polyakov                            mailto:ipolyakov_at_issart.com
Received on 2005-08-22