-
-
Save laevandus/e0dcd72fc10011b4b8e8960c1810413b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ImageProcessor { | |
func process(_ imageData: Data) async -> UIImage { | |
print(#function, Thread.isMainThread, Thread.current) | |
let image = await Task { | |
syncProcessData(imageData) | |
}.value | |
print(#function, Thread.isMainThread, Thread.current) | |
return image | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment