示例工程 20-async-await-structured-concurrency

20-async-await-structured-concurrency/expected/stdout.txt

text · 0.4 KB

[20.1] 串行结果 = ["item-1", "item-2", "item-3", "item-4"]
[20.2] 并发结果 = ["item-1", "item-2", "item-3", "item-4"]
[20.2] 完成顺序不保证,排序后才稳定
[20.3] async let = ["item-1", "item-2"]
[20.4] 取消后提前结束 = true
[20.5] async 函数返回 = 42
[20.6] MemoryLayout<SimulatedDownloader> = 16 字节
[20.6] MemoryLayout<Task<Int, Never>> = 8 字节