Fix concurrency thread-safe exception

This commit is contained in:
Peter Tang
2023-09-26 13:07:49 +08:00
parent 2f962f98c3
commit 1cf614036f
4 changed files with 77 additions and 10 deletions

View File

@@ -76,7 +76,9 @@ private class BundleManager {
private var ctFonts = [CTFontSizePair: CTFont]()
private var rawMathTables = [MathFont: NSDictionary]()
private let threadSafeQueue = DispatchQueue(label: "com.smartmath.mathfont.threadsafequeue", attributes: .concurrent)
private let threadSafeQueue = DispatchQueue(label: "com.smartmath.mathfont.threadsafequeue",
qos: .userInitiated,
attributes: .concurrent)
private func registerCGFont(mathFont: MathFont) throws {
guard let frameworkBundleURL = Bundle.module.url(forResource: "mathFonts", withExtension: "bundle"),