should be a serial queue, in order to ensure the correct ordering of callbacks. If nil, the session creates a serial operation queue for performing all delegate method calls and completion handler calls
Creating a new OperationQueue() makes a concurrent queue which can lead to inconsistent ordering of lifecycle events. This change switches to use the default delegate queue when creating a URLSession.
The
URLSession
documentation notes thatdelegateQueue
:Creating a new
OperationQueue()
makes a concurrent queue which can lead to inconsistent ordering of lifecycle events. This change switches to use the default delegate queue when creating aURLSession
.