What happens when an NSURLSessionTask is canceled?
What happens when an NSURLSessionTask is canceled?
- Subject: What happens when an NSURLSessionTask is canceled?
- From: Rick Mann <email@hidden>
- Date: Tue, 01 Dec 2015 19:45:38 -0800
What happens when an NSURLSessionTask is canceled? Does its callback or delegate get called with an error indicating it was canceled? Is it guaranteed to NOT be called back if canceled? It seems like this guarantee can't be made. In fact, it seems there's a breakdown here, if you're trying to coordinate several tasks.
I have a number of download tasks in a single session that I want to be able to cancel at any time. It seems I could get one of the tasks from the session, have it complete, and then call cancel on it. It would not be appropriate to call its callback twice. If the callback isn't called when it's canceled, then it's impossible to keep track of wether or not that task completed with something like a simple counter.
Any suggestions? Thanks.
--
Rick Mann
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden