cURL / Mailing Lists / curl-library / Single Mail

curl-library

multi threads programming

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

Hi,

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
request.

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!

Thanks!

John

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Received on 2008-01-05