cURL / Mailing Lists / curl-library / Single Mail


multi threads programming

From: Jiang Xu <>
Date: Fri, 4 Jan 2008 15:47:33 -0800 (PST)


I am new to libcurl. I am working on a project that
involves multi-threads programming. I have a question
regarding the following situation:

I have two threads. One serves as a work thread and
the other serves as a control thread. The work thread
will call curl_multi_perform() to send HTTP requests
and to receive HTTP responses. The control thread may
call curl_multi_remove_handle to cancel a specific

My question is: if the work thread is in the middle of
the callback that is called by curl_multi_perform(),
what will happen if the control thread calls
curl_multi_remove_handle() at the same time and they
are all dealing with the same handle?

I really appreciate any help!



Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Received on 2008-01-05