Avatar
修正ありがとうございます! 何点か確認させてください。
7:24 PM
こちらも原文の↓に対応するのかなと思います。 Note: To check whether a task has been canceled from outside that task, use the Task.isCancelled instance property instead of the type property. https://github.com/apple/swift-book/blob/main/TSPL.docc/LanguageGuide/Concurrency.md#task-cancellation
7:24 PM
ここは原文の After each call to addTaskUnlessCancelled(priority:operation:), the code confirms that the new child task was added. If the group is canceled, the value of added is false --- in that case, the code stops trying to download additional photos. 対応する箇所だと思いますが、どうでしょうか? https://github.com/apple/swift-book/blob/main/TSPL.docc/LanguageGuide/Concurrency.md#task-cancellation