We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 72a0d5b + 041b689 commit a455b29Copy full SHA for a455b29
SwiftDraw/UIImage+SVG.swift
@@ -144,11 +144,17 @@ extension SVG {
144
145
private extension MainActor {
146
147
+#if compiler(<6.0)
148
+ nonisolated static func syncIsolated<T>(operation: () -> T) -> T {
149
+ operation()
150
+ }
151
+#else
152
static func syncIsolated<T: Sendable>(operation: @MainActor () -> T) -> T {
153
if Thread.isMainThread {
154
return MainActor.assumeIsolated { operation() }
155
} else {
156
return DispatchQueue.main.sync { operation() }
157
}
158
159
+#endif
160
0 commit comments