We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be23249 commit b577bf7Copy full SHA for b577bf7
Foundation/URLSession/URLSession.swift
@@ -198,7 +198,6 @@ open class URLSession : NSObject {
198
/// - Note: It's a **concurrent** queue.
199
internal let taskAttributesIsolation: DispatchQueue
200
internal let taskRegistry = URLSession._TaskRegistry()
201
- fileprivate let identiferLock = NSLock()
202
fileprivate let identifier: Int32
203
fileprivate var invalidated = false
204
fileprivate static let registerProtocols: () = {
@@ -407,7 +406,7 @@ extension URLSession._Request {
407
406
408
fileprivate extension URLSession {
409
func createNextTaskIdentifier() -> Int {
410
- return identiferLock.synchronized {
+ return workQueue.sync {
411
let i = nextTaskIdentifier
412
nextTaskIdentifier += 1
413
return i
0 commit comments