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 13:11:23 -0400
(I posted this to the Cocoa-Dev list earlier, and it was suggested I post it here also.)
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, but can provide more info if needed), 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.
_______________________________________________
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