On 8 Dec 2015, at 01:58, Rick Mann <rm...@latencyzero.com> wrote: > Also, I presume this only works if the queue is a serial queue, but the docs > say it doesn't have to be such.
You really want your NSURLSession delegate queue to be a serial queue. It's going to be very hard to maintain coherent state otherwise. Moreover, your delegate queue work should be fast, so serialisation isn't a problem. If you need to do real work in this context, that work itself should be farmed off to a separate thread/queue/NSOperation. On 8 Dec 2015, at 03:52, Rick Mann <rm...@latencyzero.com> wrote: > And, the answer is no. My completion block gets called MANY more times after > I invalidate and cancel the session. I'm confused by this. Are you looking to invalidate the session or not? If you don't mind invalidating the session (-invalidateAndCancel), you should be able to kick off the new work your -URLSession:didBecomeInvalidWithError: delegate callback, which is the last callback you'll get for this session and which will arrive after all your task cancellation callbacks have run. Share and Enjoy -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware _______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com This email sent to arch...@mail-archive.com