Post

Replies

Boosts

Views

Activity

Reply to Crashes because main actor isolated closures are called on a background thread with `DispatchGroup.notify`, but no compiler warnings
Thanks for your thoughtful reply! It's much appreciated. I did follow your suggestion and opened an issue requesting the same treatment for notify. My bug number is FB20920858. P.S. Part of your answer above the horizontal line appears to have been cut off, but I was curious to hear what you were going to suggest! Regarding your suggestion for moving to Swift 6.2 and enabling default main actor isolation -- I did try this by copying my minimal example to a new Swift 6 project with Default Actor Isolation set to MainActor. Alas, it still crashes (albeit on a different line; it seems an internal thread assertion fails from the group.notify call itself rather than my MainActor.assertIsolated() in the closure body). Honestly, it's still what I expected given the missing @Sendable.
Nov ’25