Last active
February 3, 2022 09:53
-
-
Save SebastianBoldt/4ba76d8f6195c54f469f3f0bb813ad48 to your computer and use it in GitHub Desktop.
This file contains 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 getStatistics(for user: User) async throws -> (Statistics, Statistics) { | |
async let old = getOldUserStatistics(of: user) | |
async let new = getNewUserStatistics(of: user) | |
let awaitedOldStats = await old | |
let awaitedNewStats = await new | |
return (awaitedOldStats, awaitedNewStats) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment