i am using a single serial queue as the rootQueue / request / serialization queue
let queue = DispatchQueue(label: "APIManager.rootQueue")
a.session = Session(configuration: sessionConfiguration,
delegate: a,
rootQueue: queue,
startRequestsImmediately: true,
requestQueue: queue,
serializationQueue: queue,
interceptor: nil,
serverTrustManager: nil,
redirectHandler: nil,
cachedResponseHandler: nil,
eventMonitors: [])
however the requests seems to be completed in random order as to the order they were created
Compleations print to console:
[2][Request]: GET https://...
[1][Request]: GET https://...
[4][Request]: GET https://...
[3][Request]: GET https://...
[5][Request]: GET https://...
the number in [] represent the creation order PS: the order is also wrong during serialization
the queue is serial but the results looks like from concurrent
how to maintain a FIFO order of requests and results