Re: [PATCH 1/4] ares_cancel(): ensure cancellation of all requests

2013-03-23 Thread Daniel Stenberg
On Thu, 21 Mar 2013, Alexander Klauer wrote: Implementation-wise, I think I would just swap the list head in the ares channel with an empty list head on the stack, and then start walking through the list with the list head on the stack. Any new requests would then be added to the now

Re: [PATCH 1/4] ares_cancel(): ensure cancellation of all requests

2013-03-21 Thread Tommie Gannert
2013/3/21 Alexander Klauer alexander.kla...@itwm.fraunhofer.de: An invocation of ares_cancel() walks through the request list, calling the callbacks of all pending requests on a channel. Previously, if such a callback added a new request to the channel, the request list might not end up empty,

Re: [PATCH 1/4] ares_cancel(): ensure cancellation of all requests

2013-03-21 Thread Alexander Klauer
On 03/21/2013 11:45 AM, Tommie Gannert wrote: 2013/3/21 Alexander Klauer alexander.kla...@itwm.fraunhofer.de: An invocation of ares_cancel() walks through the request list, calling the callbacks of all pending requests on a channel. Previously, if such a callback added a new request to the

Re: [PATCH 1/4] ares_cancel(): ensure cancellation of all requests

2013-03-21 Thread Tommie Gannert
2013/3/21 Alexander Klauer alexander.kla...@itwm.fraunhofer.de: What happens if someone calls ares_cancel() while ares_cancel() is in progress? With (1), that would mean that the topmost (most recent) instance ares_cancel() has to cancel all those requests that appeared since the