cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: pthread_cancel while in curl_easy_perform

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 29 Jan 2013 23:41:22 +0100 (CET)

On Tue, 29 Jan 2013, Andrew Strohman wrote:

>> http://curl.haxx.se/docs/faq.html#How_do_I_stop_an_ongoing_transfe
>
> Thanks for the reply. Does your statement also apply to the multi
> interface? The way the faq is worded gives me hope that I can safely do
> pthread_cancel if I'm using the multi interface. Is that right?

Nope. Forget about pthread_cancel (or any other thread-killing function),
that's not the tool you want for this task.

The standard way to stop a transfer with the multi interface is what is
described in that FAQ entry: "If you're using the multi interface, you can
also stop a transfer by removing the particular easy handle from the multi
stack at any moment you think the transfer is done."

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-01-29