You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func dewarpAndCleanupImage(_ i : Image) async -> Image
38
+
```
39
+
40
+
Calls to `async` functions may suspend, meaning that they give up the thread on which they are executing and will be scheduled to run again later. The potential for suspension on asynchronous calls requires the `await` keyword, similarly to the way in which `try` acknowledges a call to a `throws` function:
41
+
42
+
```swift
43
+
func processImageData() async throws -> Image {
44
+
let dataResource = try await loadWebResource("dataprofile.txt")
45
+
let imageResource = try await loadWebResource("imagedata.dat")
46
+
let imageTmp = try await decodeImage(dataResource, imageResource)
47
+
let imageResult = await dewarpAndCleanupImage(imageTmp)
0 commit comments