#swiftconcurrency — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #swiftconcurrency, aggregated by home.social.
-
`Task { }` doesn't move work off the main thread. It inherits the actor context. In SwiftUI that's @ MainActor.
In Xcode 26, `nonisolated async` doesn't either: it now runs on the caller's actor.
Want off? Mark the function `@ concurrent`. Offloading is explicit now.
-
async/await does not make work run off the main thread by default.
That mistake can still freeze your UI during real app work.
I explain how to avoid it in my free 5-day Swift Concurrency Playbook:
-
Using async/await should make asynchronous Swift code easier to read and follow.
It's essential to know where suspension can happen and how errors move through your code.
I explain it with practical examples.
-
Creating a Task inside onAppear often looks harmless until SwiftUI redraws and your app starts duplicate API calls.
I created a free 5-day Swift Concurrency Playbook to help you avoid mistakes like this in real app code:
-
Creating a Task inside onAppear often looks harmless until SwiftUI redraws and your app starts duplicate API calls.
I created a free 5-day Swift Concurrency Playbook to help you avoid mistakes like this in real app code:
-
Using async/await should make asynchronous Swift code easier to read and follow.
I explain how it replaces nested completion handlers with code that still runs asynchronously through clear examples.
-
async/await does not automatically move work off the main thread.
That mistake can still freeze your UI. I created a free 5-day Swift Concurrency Playbook to help you avoid it in real app work:
-
Using async/await should make asynchronous Swift code easier to read and follow.
I explain the baseline with code examples, including mistakes to avoid when replacing nested completion handlers:
-
@mattiem @DaylishApp next will be @zenitizer but that’s a little more ambitious as the code base is older … but I’m motivated to do this now.
I think the “post Swift 6.2 world” is a good time for folks who were curious about #SwiftConcurrency but haven’t embraced it yet to give it a go 🤓
-
@mattiem @DaylishApp next will be @zenitizer but that’s a little more ambitious as the code base is older … but I’m motivated to do this now.
I think the “post Swift 6.2 world” is a good time for folks who were curious about #SwiftConcurrency but haven’t embraced it yet to give it a go 🤓
-
“… we can entirely eliminate suspension points and make everything synchronous when dealing with an actor …”
Only a MONSTER can leave me waiting for another week with this cliffhanger!!! 🥲
On a serious note, I’ve been really enjoying this series from @pointfreeco and cannot wait for the rest of videos!
-
“… we can entirely eliminate suspension points and make everything synchronous when dealing with an actor …”
Only a MONSTER can leave me waiting for another week with this cliffhanger!!! 🥲
On a serious note, I’ve been really enjoying this series from @pointfreeco and cannot wait for the rest of videos!
-
Really quickly this morning, I pulled out some swift async helpers I've been using in some personal apps into a separate repo, mostly to make it easier to keep them all in sync. I published it at https://forge.younata.com/you/AsyncExtensions
Probably the most interesting thing there is AsyncMultiChannel. Which is like https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Channel.md, but it supports multiple subscribers. I should rename it, because it's intended to be used in more of a pub-sub architecture than as 1-1 communication.
-
Really quickly this morning, I pulled out some swift async helpers I've been using in some personal apps into a separate repo, mostly to make it easier to keep them all in sync. I published it at https://forge.younata.com/you/AsyncExtensions
Probably the most interesting thing there is AsyncMultiChannel. Which is like https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides/Channel.md, but it supports multiple subscribers. I should rename it, because it's intended to be used in more of a pub-sub architecture than as 1-1 communication.
-
🚀 I just released Swift Streamable Actors v1.0!
If you’ve ever wanted to observe changes to a Swift Actor's state as an AsyncStream without writing 30 lines of boilerplate for every property, this macro is for you.
Key highlights: ✅ 100% Type-safe (no type-erasure/AnyKeyPath) ✅ Memory safe (static factories avoid strong reference cycles) ✅ Clean API: @Streamable does it all.
Check out the code: https://github.com/malhal/swift-streamable-actors
-
🚀 I just released Swift Streamable Actors v1.0!
If you’ve ever wanted to observe changes to a Swift Actor's state as an AsyncStream without writing 30 lines of boilerplate for every property, this macro is for you.
Key highlights: ✅ 100% Type-safe (no type-erasure/AnyKeyPath) ✅ Memory safe (static factories avoid strong reference cycles) ✅ Clean API: @Streamable does it all.
Check out the code: https://github.com/malhal/swift-streamable-actors
-
🤦♂️ "Finally understand Swift concurrency" - because reading endless jargon-filled screeds is exactly how everyone wants to spend their afternoons. 🙄 Huge thanks to Matt for translating developer hieroglyphics into slightly less intimidating developer hieroglyphics! 🎉
https://fuckingapproachableswiftconcurrency.com/en/ #SwiftConcurrency #Understanding #DeveloperJargon #TechTranslation #CodingHumor #DeveloperCommunity #HackerNews #ngated -
🤦♂️ "Finally understand Swift concurrency" - because reading endless jargon-filled screeds is exactly how everyone wants to spend their afternoons. 🙄 Huge thanks to Matt for translating developer hieroglyphics into slightly less intimidating developer hieroglyphics! 🎉
https://fuckingapproachableswiftconcurrency.com/en/ #SwiftConcurrency #Understanding #DeveloperJargon #TechTranslation #CodingHumor #DeveloperCommunity #HackerNews #ngated -
Fucking Approachable Swift Concurrency
https://fuckingapproachableswiftconcurrency.com/en/
#HackerNews #FuckingApproachableSwiftConcurrency #SwiftConcurrency #Programming #DeveloperCommunity #TechNews
-
Fucking Approachable Swift Concurrency
https://fuckingapproachableswiftconcurrency.com/en/
#HackerNews #FuckingApproachableSwiftConcurrency #SwiftConcurrency #Programming #DeveloperCommunity #TechNews
-
What do robot toddlers and coloring pages teach us about data races? First in a series building concrete mental models for Swift Concurrency. Feedback welcome!
https://krishna.github.io/posts/understanding-data-races-visual-guide/
-
What do robot toddlers and coloring pages teach us about data races? First in a series building concrete mental models for Swift Concurrency. Feedback welcome!
https://krishna.github.io/posts/understanding-data-races-visual-guide/
-
Notifications crashing with concurrency errors? Replace unsafe 𝑛𝑜𝑡𝑖𝑓𝑦() calls with 𝘔𝘢𝘪𝘯𝘈𝘤𝘵𝘰𝘳𝘔𝘦𝘴𝘴𝘢𝘨𝘦 and 𝘈𝘴𝘺𝘯𝘤𝘔𝘦𝘴𝘴𝘢𝘨𝘦. Thread-safe, modern, and built for async/await.
🔗 https://www.avanderlee.com/concurrency/mainactormessage-asyncmessage-concurrency-safe-notifications/ by Antoine van der Lee (@swiftlee)
-
Struggling with protocol conformance across actor isolation boundaries? Swift 6.2 introduces isolated conformances and protocol isolation features that can be tricky to navigate. This step-by-step breakdown helps you understand when and how to use these patterns correctly, making your concurrent code safer and more maintainable.
🔗: https://www.massicotte.org/step-by-step-conforming-to-protocols by Matt Massicotte (@mattiem)
-
Are your singletons causing concurrency headaches in Swift 6? A breakdown of thread-safety challenges and practical patterns for making singletons work with modern Swift Concurrency.
🔗: https://www.massicotte.org/singletons by Matt Massicotte (@mattiem)
-
Are your singletons causing concurrency headaches in Swift 6? A breakdown of thread-safety challenges and practical patterns for making singletons work with modern Swift Concurrency.
🔗: https://www.massicotte.org/singletons by Matt Massicotte (@mattiem)
-
Want to adopt new Swift features without breaking your code? Swift's migration tooling is essential for safe, gradual transitions. Learn how to leverage it for upcoming Swift features.
🔗: https://www.avanderlee.com/concurrency/swift-migration-tooling-upcoming-swift-features/ by Antoine van der Lee (@swiftlee)
-
How do you bridge the gap between legacy Apple APIs and Swift 6's strict concurrency model?
𝑀𝑎𝑖𝑛𝐴𝑐𝑡𝑜𝑟.𝑎𝑠𝑠𝑢𝑚𝑒𝐼𝑠𝑜𝑙𝑎𝑡𝑒𝑑 provides a MainActor context within synchronous methods, solving compatibility issues with APIs like 𝑁𝑆𝑇𝑒𝑥𝑡𝐴𝑡𝑡𝑎𝑐ℎ𝑚𝑒𝑛𝑡𝑉𝑖𝑒𝑤𝑃𝑟𝑜𝑣𝑖𝑑𝑒𝑟 and 𝑈𝐼𝐻𝑜𝑠𝑡𝑖𝑛𝑔𝐶𝑜𝑛𝑡𝑟𝑜𝑙𝑙𝑒𝑟. This is essential knowledge for Swift 6 migration!
🔗: https://fatbobman.com/en/posts/mainactor-assumeisolated/ by @fatbobman
-
How do you bridge the gap between legacy Apple APIs and Swift 6's strict concurrency model?
𝑀𝑎𝑖𝑛𝐴𝑐𝑡𝑜𝑟.𝑎𝑠𝑠𝑢𝑚𝑒𝐼𝑠𝑜𝑙𝑎𝑡𝑒𝑑 provides a MainActor context within synchronous methods, solving compatibility issues with APIs like 𝑁𝑆𝑇𝑒𝑥𝑡𝐴𝑡𝑡𝑎𝑐ℎ𝑚𝑒𝑛𝑡𝑉𝑖𝑒𝑤𝑃𝑟𝑜𝑣𝑖𝑑𝑒𝑟 and 𝑈𝐼𝐻𝑜𝑠𝑡𝑖𝑛𝑔𝐶𝑜𝑛𝑡𝑟𝑜𝑙𝑙𝑒𝑟. This is essential knowledge for Swift 6 migration!
🔗: https://fatbobman.com/en/posts/mainactor-assumeisolated/ by @fatbobman
-
I believe I must be missing something, but I just have too little experience with #SwiftConcurrency, I guess. 😔
#BuildInPublic #IndieHacker #iOSDev #IndieDev -
I believe I must be missing something, but I just have too little experience with #SwiftConcurrency, I guess. 😔
#BuildInPublic #IndieHacker #iOSDev #IndieDev -
Never too early to start writing that wishlist!
#Xcode #Swift #SwiftConcurrency
https://iamkonstantin.eu/blog/my-concurrency-wishlist-for-xcode-27/
-
Never too early to start writing that wishlist!
#Xcode #Swift #SwiftConcurrency
https://iamkonstantin.eu/blog/my-concurrency-wishlist-for-xcode-27/
-
🧩 Confused by Swift 6 concurrency keywords?
New article breaks down Sendable, `@unchecked Sendable`, `@Sendable`, sending, and nonsending - their differences and use cases.
One table to understand them all 📊
👉 https://fatbobman.com/en/posts/sendable-sending-nonsending/
#Swift #iOSDev #SwiftConcurrency -
🧩 Confused by Swift 6 concurrency keywords?
New article breaks down Sendable, `@unchecked Sendable`, `@Sendable`, sending, and nonsending - their differences and use cases.
One table to understand them all 📊
👉 https://fatbobman.com/en/posts/sendable-sending-nonsending/
#Swift #iOSDev #SwiftConcurrency -
🗓️ Saturday, July 5, 11:30am Pacific, 18:30 UTC
Swift Concurrency, Group Learning Session: Parallelization of TasksIn this session, we will be investigating and leveraging parallelization of tasks. Specifically, we will attempt to parallelize rendering of map tiles in the CubiomesKit project.
#SwiftConcurrency #SwiftDev #AppleDev
https://discord.gg/euyXVzzX?event=1388624765169827942 -
🗓️ Saturday, July 5, 11:30am Pacific, 18:30 UTC
Swift Concurrency, Group Learning Session: Parallelization of TasksIn this session, we will be investigating and leveraging parallelization of tasks. Specifically, we will attempt to parallelize rendering of map tiles in the CubiomesKit project.
#SwiftConcurrency #SwiftDev #AppleDev
https://discord.gg/euyXVzzX?event=1388624765169827942 -
✨Swift 6.2 ✨
SE-0481 is introducing "weak let" to Swift 6.2!
That will allow us to create immutable weak references that can't be reassigned after initialization, but can still become nil when the referenced object is deallocated.
This is a game-changer for Sendable compliance (weak var can't be Sendable, but weak let can!) 🎉
#Swift #iOS #SwiftConcurrency #SwiftLang
https://github.com/swiftlang/swift-evolution/blob/main/proposals/0481-weak-let.md
-
My talk at OneMoreThing 2024 on #UnitTesting #SwiftUI and #SwiftConcurrency was recorded, but has yet to be edited and uploaded.
Last night, I published an edited form of my speaker notes from that talk to my blog.https://blog.rachelbrindle.com/2025/06/12/testing-swiftui-and-swiftconcurrency/
-
My talk at OneMoreThing 2024 on #UnitTesting #SwiftUI and #SwiftConcurrency was recorded, but has yet to be edited and uploaded.
Last night, I published an edited form of my speaker notes from that talk to my blog.https://blog.rachelbrindle.com/2025/06/12/testing-swiftui-and-swiftconcurrency/
-
📣 #iOSDev PSA: new #Xcode26 projects default to Main Actor isolation, which can lead to errors with Sendable types ⚠️
Possible Fixes:
1: Change default isolation
2: Mark type as nonisolated
3: Ignore #SwiftConcurrency 🫣@mattiem has a great post on default isolation: https://www.massicotte.org/default-isolation-swift-6_2
Quite frankly, if I hadn't read your post before, I probably would've taken a lot longer to figure out why the heck the type in question was MainActor isolated to begin with - thanks Matt! 👏
-
📣 #iOSDev PSA: new #Xcode26 projects default to Main Actor isolation, which can lead to errors with Sendable types ⚠️
Possible Fixes:
1: Change default isolation
2: Mark type as nonisolated
3: Ignore #SwiftConcurrency 🫣@mattiem has a great post on default isolation: https://www.massicotte.org/default-isolation-swift-6_2
Quite frankly, if I hadn't read your post before, I probably would've taken a lot longer to figure out why the heck the type in question was MainActor isolated to begin with - thanks Matt! 👏
-
🗓️ Next Saturday, June 7, 11:30am Pacific, 18:30 UTC
Group-learning session focused on use of actors in Swift Concurrency.#SwiftConcurrency #SwiftDev #iosDev #macOSDev
On the Swift Dev Chat Discord:
https://discord.gg/sGM552KyMn?event=1378456030488301598 -
Group learning session on the Swift Dev Chat Discord server.
🗓️ Saturday, May 24, 11am Pacific, 18:00 UTC.Participate in “ensemble coding” as we (try to) apply strict Swift Concurrency to an existing open source project (XcInspector—SwiftUI app on macOS, plus command-line tool).
All experience levels welcome—as long as you’re wanting to learn more about programming in Swift.
#SwiftUI #SwiftConcurrency
https://discord.gg/sGM552KyMn?event=1370844232952053852 -
Another evening with ModelActor and another strange behavior. This time it's not the way of passing the arguments, but the order of method calling. @mattiem, are you interested? 😅
#Swift #ModelActor #SwiftConcurrency -
I didn’t expect to delve so much into Swift Concurrency at this moment, but it was so interesting investigating what’s working and why I just couldn’t resist. 😅 Don’t get me wrong, I still know very little, but at least I could try to explain the async code I’m writing. 😆
#SwiftConcurrency #iOSProgramming -
My app, #PDXTransit, turns 10 years old this year this August. I wrote it when I moved to Portland back in 2015.
Well, this year for its 10th birthday, I plan to release a complete re-write using the latest technologies from Apple including an iPad-specific user experience.
Here's a sneak peek at what I've been working on the past few years with #SwiftUI, #SwiftConcurrency, and #SwiftData!!!
(and of course it comes with a re-write of its companion app for Apple Watch!)