From 9e4b455a3406ab4850d8e64dd1917745f808da55 Mon Sep 17 00:00:00 2001 From: Scott Talbot Date: Sun, 5 May 2019 12:51:02 +1000 Subject: [PATCH] Target task callbacks to the session's queue --- Sources/DVR/SessionDataTask.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/DVR/SessionDataTask.swift b/Sources/DVR/SessionDataTask.swift index 7a2a9ac..28f5c75 100644 --- a/Sources/DVR/SessionDataTask.swift +++ b/Sources/DVR/SessionDataTask.swift @@ -12,7 +12,7 @@ final class SessionDataTask: URLSessionDataTask { weak var session: Session! let request: URLRequest let completion: Completion? - private let queue = DispatchQueue(label: "com.venmo.DVR.sessionDataTaskQueue", attributes: []) + private let queue: DispatchQueue private var interaction: Interaction? override var response: Foundation.URLResponse? { @@ -26,6 +26,7 @@ final class SessionDataTask: URLSessionDataTask { self.session = session self.request = request self.completion = completion + queue = DispatchQueue(label: "com.venmo.DVR.sessionDataTaskQueue", qos: .userInitiated, attributes: [], target: session.delegateQueue.underlyingQueue) }