resource loading is serialised, font and mathtable dictionaries in BundleManager are threadsafe protected.

This commit is contained in:
Peter Tang
2023-09-18 19:04:06 +08:00
parent 6306ab7c4b
commit b637b18ace
6 changed files with 78 additions and 39 deletions

View File

@@ -33,6 +33,7 @@ final class MTFontV2Tests: XCTestCase {
XCTAssertEqual(self.testCount, totalCases)
print("\(self.testCount) completed =================")
}
executionGroup.wait()
}
func helperConcurrentMTFontV2(_ count: Int, mathFont: MathFont, in group: DispatchGroup, on queue: DispatchQueue) {
let size = CGFloat.random(in: 20 ... 40)
@@ -69,6 +70,7 @@ final class MTFontV2Tests: XCTestCase {
XCTAssertEqual(self.testCount, totalCases)
print("\(self.testCount) completed =================")
}
executionGroup.wait()
}
func helperConcurrentMTFontV2MathTableLock(_ count: Int, mtfont: MTFontV2, in group: DispatchGroup, on queue: DispatchQueue) {
let workitem = DispatchWorkItem {