Multiple NSURLSession (same identifier) - one invalidated, one not
Multiple NSURLSession (same identifier) - one invalidated, one not
- Subject: Multiple NSURLSession (same identifier) - one invalidated, one not
- From: Sebastien Boisvert <email@hidden>
- Date: Tue, 26 Apr 2016 11:31:38 -0400
The NSURLSession docs state:
" Note: You must create exactly one session per identifier (specified when you create the configuration object). The behavior of multiple sessions sharing the same identifier is undefined. "
It doesn't make it clear however if it matters or not that only one of the sessions hasn't been invalidated.
Specifically, I'm wondering if I invalidate an existing session (using something like -finishTasksAndInvalidate), then bring up a new one with the same identifier/configuration (while the first might still have its tasks going), if this is safe to do so.
I won't go into the specific details why I need to do it this way (mostly don't want to bore anyone), I'm just wondering if it's safe to have multiple sessions in this way (that is, making sure only 1 is valid at any time).
Thanks.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden