Avatar
Avatar
hironytic
だから、コンパイラとしては、(1) から (2) へ、(2) から (3) へ、全部MainActorだと思っていて、(2) が終わったあと、そのままそのスレッドで継続して (3) を実行するコードを吐いてもいいし、(3) は改めてMainActorのキューにのせるコードを吐いてもいいんじゃないかと。
でもこれが想定仕様だとすると、 (2) は将来 MainActor に投入されるようになる?↓だし。
This is in line with the long term plan for actor isolation, but opens up some holes in the short term because Sendable closures are not enforced throughout the Swift ecosystem.