I found a decent description about async/await here: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/ <https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/>
So it’s much more like runloop based callbacks in Foundation that libdispatch. It’s complicated. Even the simplest example is super complicated. It’s super implicit (like, “I’m going to package up every line of code from await to the end of this function and turn it into a continuation”). That seems to go against one of the primary principles of Swift, which is to make things plain to the reader. I’d be interested to know what the call stack looks like on the line after await. The doc takes away some of the mystery, but leaves major questions, like: await is used to yield control to the parent, but at the bottom of the call stack, presumably you’re going to do something blocking, so how do you call await? -Kenny
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution