Is there an easy way to cancel a curl_easy_perform from another thread?
Asked
Active
Viewed 2,886 times
1 Answers
8
You have to use the callback functions (write/read/progress) to perform the cancel. The other thread needs to set a flag and the callback function checks the flag and returns the proper value to cancel the operation.

robottobor
- 11,595
- 11
- 39
- 37
-
When I return from curl_progress_callback non-zero value, it stop sending request, bit also program is crashed. Is it mention to be? Can you advise method for cancelling without crashing? – Alecs Sep 12 '11 at 15:13