137
137
/// - SeeAlso: https://curl.haxx.se/libcurl/c/threadsafe.html
138
138
/// - SeeAlso: URLSession+libcurl.swift
139
139
///
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
- ///
145
140
/// ## HTTP and RFC 2616
146
141
///
147
142
/// Most of HTTP is defined in [RFC 2616](https://tools.ietf.org/html/rfc2616).
@@ -194,9 +189,6 @@ open class URLSession : NSObject {
194
189
fileprivate let multiHandle : _MultiHandle
195
190
fileprivate var nextTaskIdentifier = 1
196
191
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
200
192
internal let taskRegistry = URLSession . _TaskRegistry ( )
201
193
fileprivate let identifier : Int32
202
194
fileprivate var invalidated = false
@@ -222,7 +214,6 @@ open class URLSession : NSObject {
222
214
initializeLibcurl ( )
223
215
identifier = nextSessionIdentifier ( )
224
216
self . workQueue = DispatchQueue ( label: " URLSession< \( identifier) > " )
225
- self . taskAttributesIsolation = DispatchQueue ( label: " URLSession< \( identifier) >.taskAttributes " , attributes: DispatchQueue . Attributes. concurrent)
226
217
self . delegateQueue = OperationQueue ( )
227
218
self . delegateQueue. maxConcurrentOperationCount = 1
228
219
self . delegate = nil
@@ -245,7 +236,6 @@ open class URLSession : NSObject {
245
236
initializeLibcurl ( )
246
237
identifier = nextSessionIdentifier ( )
247
238
self . workQueue = DispatchQueue ( label: " URLSession< \( identifier) > " )
248
- self . taskAttributesIsolation = DispatchQueue ( label: " URLSession< \( identifier) >.taskAttributes " , attributes: DispatchQueue . Attributes. concurrent)
249
239
if let _queue = queue {
250
240
self . delegateQueue = _queue
251
241
} else {
0 commit comments