Skip to content

Instantly share code, notes, and snippets.

@laevandus
Created July 23, 2022 01:52
Embed
What would you like to do?
struct ImageProcessor {
func syncProcessData(_ imageData: Data) -> UIImage {
print(#function, "started", Thread.isMainThread, Thread.current)
Thread.sleep(forTimeInterval: 10) // simulates a blocking operation
print(#function, "finished", Thread.isMainThread, Thread.current)
return UIImage(systemName: "sun.max")!
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment