[swift-evolution] New async keyword usage

Florent Vilmart florent at flovilmart.com
Fri Aug 25 17:02:26 CDT 2017


Probably with:

let a = longCalculationA()
let b = longCalculationB() //b doesn’t wait for a to complete before starting
let c = longCalculationC() //c doesn’t wait for a or b
let (aResult, bResult, cResult) = await Future.collect(a, b, c) //waits until a, b, and c are all available

On 25 août 2017 17:48 -0400, wrote:
>
> let a = async longCalculationA()
> let b = async longCalculationB() //b doesn’t wait for a to complete before starting
> let c = async longCalculationC() //c doesn’t wait for a or b
> let result = await combineCalculations(a: a, b: b, c: c) //waits until a, b, and c are all available
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170825/723885b1/attachment.html>


More information about the swift-evolution mailing list