From 63d47607229bc8417ca086c2309cadc75a713b00 Mon Sep 17 00:00:00 2001 From: Ryo Aoyama Date: Wed, 20 Nov 2024 15:39:09 +0900 Subject: [PATCH] Use @_inheritActorContext (#159) --- Sources/Atoms/AsyncPhase.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Sources/Atoms/AsyncPhase.swift b/Sources/Atoms/AsyncPhase.swift index 19373599..a89963c0 100644 --- a/Sources/Atoms/AsyncPhase.swift +++ b/Sources/Atoms/AsyncPhase.swift @@ -30,11 +30,7 @@ public enum AsyncPhase { /// /// - Parameter body: A async throwing closure to evaluate. public init( - // Adopt SE-0420 Inheritance of actor isolation instead of adding @Sendable - // to the body closure once the compiler crash that happens with Swift 6.0 - // when used in an initializer is solved. - // isolation: isolated (any Actor)? = #isolation, - catching body: @Sendable () async throws(Failure) -> Success + @_inheritActorContext catching body: () async throws(Failure) -> Success ) async { do { let value = try await body()