Avatar
omochimetaru 8/18/2017 3:16 AM
// Legacy callback-based API func getStuff(completion: (Stuff) -> Void) { ... } // Swift wrapper func getStuff() async -> Stuff { return await suspendAsync { continuation in getStuff(completion: continuation) } }
3:16 AM
↑この例がわかりやすい