Skip to content

Instantly share code, notes, and snippets.

@laevandus
Created Jul 23, 2022
Embed
What would you like to do?
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