From b9cd8310e748f075a23d3418d42d4c7f7bbd4f2d Mon Sep 17 00:00:00 2001 From: Anton Kuzmin Date: Thu, 14 Jan 2021 14:01:34 +0300 Subject: [PATCH] use custom concurrent queue --- .../xcode/package.xcworkspace/contents.xcworkspacedata | 7 +++++++ Source/Classes/ActionHandling/Link.swift | 2 +- Source/Classes/NantesLabel.swift | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Source/Classes/ActionHandling/Link.swift b/Source/Classes/ActionHandling/Link.swift index 2514db0..5df71bb 100644 --- a/Source/Classes/ActionHandling/Link.swift +++ b/Source/Classes/ActionHandling/Link.swift @@ -176,7 +176,7 @@ extension NantesLabel { return } - DispatchQueue.global(qos: .default).async { [weak self] in + self.nantesQueue.async { [weak self] in guard let self = self else { return } diff --git a/Source/Classes/NantesLabel.swift b/Source/Classes/NantesLabel.swift index 8309287..d581f26 100644 --- a/Source/Classes/NantesLabel.swift +++ b/Source/Classes/NantesLabel.swift @@ -113,6 +113,12 @@ import UIKit private var _renderedAttributedText: NSAttributedString? + // MARK: - Internal lets + + let nantesQueue = DispatchQueue(label: "com.Nantes.NantesQueue", + qos: .userInitiated, + attributes: .concurrent) + // MARK: - Internal vars var _accessibilityElements: [Any]?