async { ... } // Swift 6.2で追加 nonisolated(nonsending) func asyncNonIsolatedNonsending(data: NonSendableType) async { ... } Swift6.2のnonisolatedな関数の振る舞いの変化 呼び出し元のActor/スレッドで 実行される(変更無し) New 呼び出し元のActor/スレッドで 実行される(※2) (Actorを跨ぐ必要がなくなったので、非 Sendable(=nonsending)な型を扱える) ※1. SE-0338 「アクター分離されていない非同期関数の実行について」 ※2. SE-0461 (A nonisolated(nonsending) async function does not hop to another actor, so its arguments and results do not need to be Sendable.) (変更後) nonisolated(nosending) By Default の設定に依存 (変更前) 呼び出し元のActor 外での実行 (※1)