You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When used, at runtime, the thread running completion handler of URLSessionTasks will have a qualityOfService set to -1 (default) instead of background. However, if I uncomment the line above setting the qualityOfService for the OperationQueue, then it works as expected (thread has correct qualityOfService).
Another way I tested was:
letdataTask = sharedURLSession.dataTask(with: request) { [weakself] (dataOpt, response, error) indo {
assert(Thread.current.qualityOfService == .background, "This should run in background QoS thread!")
...
} catch {
...
}
}
The issue here is that this seems to directly contradict the documentation at:
Additional Detail from JIRA
md5: 68b25b584799319d23bcb5720d61e3fa
Issue Description:
Given the following constants in a class:
When used, at runtime, the thread running completion handler of URLSessionTasks will have a qualityOfService set to -1 (default) instead of background. However, if I uncomment the line above setting the qualityOfService for the OperationQueue, then it works as expected (thread has correct qualityOfService).
Another way I tested was:
The issue here is that this seems to directly contradict the documentation at:
https://developer.apple.com/documentation/foundation/operationqueue/1415344-underlyingqueue
which states:
The text was updated successfully, but these errors were encountered: