Skip to content

Commit 61ce034

Browse files
Pushkar N Kulkarniianpartridge
authored andcommitted
Remove unused queue from URLSession (#1230)
1 parent fd7ce6b commit 61ce034

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

Foundation/URLSession/URLSession.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,6 @@
137137
/// - SeeAlso: https://curl.haxx.se/libcurl/c/threadsafe.html
138138
/// - SeeAlso: URLSession+libcurl.swift
139139
///
140-
/// The (publicly accessible) attributes of an `URLSessionTask` are made thread
141-
/// safe by using a concurrent libdispatch queue and only doing writes with a
142-
/// barrier while allowing concurrent reads. A single queue is shared for all
143-
/// tasks of a given session for this isolation. C.f. `taskAttributesIsolation`.
144-
///
145140
/// ## HTTP and RFC 2616
146141
///
147142
/// Most of HTTP is defined in [RFC 2616](https://tools.ietf.org/html/rfc2616).
@@ -194,9 +189,6 @@ open class URLSession : NSObject {
194189
fileprivate let multiHandle: _MultiHandle
195190
fileprivate var nextTaskIdentifier = 1
196191
internal let workQueue: DispatchQueue
197-
/// This queue is used to make public attributes on `URLSessionTask` instances thread safe.
198-
/// - Note: It's a **concurrent** queue.
199-
internal let taskAttributesIsolation: DispatchQueue
200192
internal let taskRegistry = URLSession._TaskRegistry()
201193
fileprivate let identifier: Int32
202194
fileprivate var invalidated = false
@@ -222,7 +214,6 @@ open class URLSession : NSObject {
222214
initializeLibcurl()
223215
identifier = nextSessionIdentifier()
224216
self.workQueue = DispatchQueue(label: "URLSession<\(identifier)>")
225-
self.taskAttributesIsolation = DispatchQueue(label: "URLSession<\(identifier)>.taskAttributes", attributes: DispatchQueue.Attributes.concurrent)
226217
self.delegateQueue = OperationQueue()
227218
self.delegateQueue.maxConcurrentOperationCount = 1
228219
self.delegate = nil
@@ -245,7 +236,6 @@ open class URLSession : NSObject {
245236
initializeLibcurl()
246237
identifier = nextSessionIdentifier()
247238
self.workQueue = DispatchQueue(label: "URLSession<\(identifier)>")
248-
self.taskAttributesIsolation = DispatchQueue(label: "URLSession<\(identifier)>.taskAttributes", attributes: DispatchQueue.Attributes.concurrent)
249239
if let _queue = queue {
250240
self.delegateQueue = _queue
251241
} else {

0 commit comments

Comments
 (0)