concurrency-safe because it is non-isolated global shared mutable state; WWDC24. 「Swift 6へのアプリの移行」 . https://developer.apple.com/jp/videos/play/wwdc2024/10169/, (参照 2024-7-11)
nonisolated(unsafe)を付与する Var 'XXX' is not concurrency-safe because it is non-isolated global shared mutable state; WWDC24. 「Swift 6へのアプリの移行」 . https://developer.apple.com/jp/videos/play/wwdc2024/10169/, (参照 2024-7-11)
❏ Call a main actor isolated class method from sync nonisolated context ❏ Concurrencyを使えるようにasyncを追加する or Task で囲む ❏ @MainActorをメソッドに付与する ❏ 呼び出し側もMainActorで呼び出す必要がある WWDC24. 「Swift 6へのアプリの移行」 . https://developer.apple.com/jp/videos/play/wwdc2024/10169/, (参照 2024-7-11)