Created
March 19, 2025 07:20
-
-
Save gaeng2y/9fcb93b3cf429a44a86d513b0ee5dd6c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| func fetchThumbnails(for ids: [String]) async throws -> [String: UIImage] { | |
| var thumbnails: [String: UIImage] = [:] | |
| for id in ids { | |
| thumbnails[id] = try await fetchOneThumbnail(withID: id) | |
| } | |
| return thumbnails | |
| } | |
| func fetchOneThumbnail(withID id: String) async throws -> UIImage { | |
| // ... | |
| async let (data, _) = URLSession.shared.data(for: imageReq) | |
| async let (metadata, _) = URLSession.shared.data(for: metadataReq) | |
| // ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment