Native Structured Concurrency in Swift

From looking at this and this, perhaps there’s a chance of getting the Swift maintainers interested in adding native support for structured concurrency, as the Kotlin maintainers have done.

I haven’t yet had the need or interest in doing much with Swift myself, but if native support for structured concurrency were added to it, that’d probably change quickly.

Would anyone with more experience in the Swift community be interested in bringing this up there? (I tried asking about this in a comment on one of those gists, but I’m not sure the Swift maintainers noticed.)

/cc @anandabits et al.

I’m pretty active in the Swift community. Concurrency is a major feature area that hasn’t been in scope as a theme for a Swift release yet (hopefully this will happen in Swift 6 later this year).

The links above are written by core team members indicating directions that are likely to be explored when it is in scope as a theme. At least one of the authors (Joe Groff) is very interested in structured concurrency. Discussion in the Swift community also happens on a Discourse forum (https://forums.swift.org) so it isn’t too suprising if gist comments weren’t noticed.

I haven’t seen any discussion yet about how structured concurrency might be approached as a native language feature in Swift. With concurrency explicitly out of scope for now it would be preliminary to start a discussion and the core team is not likely to have time to engage.

One significant concern for any concurrency design will be how Apple’s platform frameworks can be retrofitted to interoperate with the new approach to concurrency. I haven’t given any thought to whether or how structured concurrency could be layered onto those existing frameworks.

It isn’t clear where the Swift concurrency discussion will lead yet but I’m very much looking forward to it when the time is right (and hoping it happens in the near future).

1 Like

Thanks for the info!

Seems like it’s too soon for there to be some “concurrency” (much less “structured concurrency”) category over at forums.swift.org that people in my position could subscribe to or check periodically to find out when there’s been more progress. But maybe this thread can serve some of that purpose.

Hot off the presses: https://forums.swift.org/t/concurrency-structured-concurrency/41622