Skip to content

Instantly share code, notes, and snippets.

@agiletalk
Last active February 7, 2022 00:58
Show Gist options
  • Save agiletalk/dba1c3a3613dc973bb3c3161f00932a3 to your computer and use it in GitHub Desktop.
Save agiletalk/dba1c3a3613dc973bb3c3161f00932a3 to your computer and use it in GitHub Desktop.
async
func loadFeed() async throws -> Feed.Entries {
try await withCheckedThrowingContinuation { continuation in
fetchFeed { result in
continuation.resume(with: result)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment