• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
What happens when an NSURLSessionTask is canceled?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: What happens when an NSURLSessionTask is canceled?
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
  • Prev by Date: Re: Problem with connection via Proxy using CFNetwork in TCP stream
  • Next by Date: RE: Problem with connection via Proxy using CFNetwork in TCP stream
  • Previous by thread: Re: Problem with connection via Proxy using CFNetwork in TCP stream
  • Next by thread: Re: What happens when an NSURLSessionTask is canceled?
  • Index(es):
    • Date
    • Thread