Skip to content

Commit a455b29

Browse files
committed
Merge branch 'main' into swift-6.1
# Conflicts: # SwiftDraw/UIImage+SVG.swift
2 parents 72a0d5b + 041b689 commit a455b29

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

SwiftDraw/UIImage+SVG.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,17 @@ extension SVG {
144144

145145
private extension MainActor {
146146

147+
#if compiler(<6.0)
148+
nonisolated static func syncIsolated<T>(operation: () -> T) -> T {
149+
operation()
150+
}
151+
#else
147152
static func syncIsolated<T: Sendable>(operation: @MainActor () -> T) -> T {
148153
if Thread.isMainThread {
149154
return MainActor.assumeIsolated { operation() }
150155
} else {
151156
return DispatchQueue.main.sync { operation() }
152157
}
153158
}
159+
#endif
154160
}

0 commit comments

Comments
 (0)