home.social

#swiftconcurrency — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #swiftconcurrency, aggregated by home.social.

fetched live
  1. `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.

    #iOSDev #Swift #SwiftConcurrency

  2. 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:

    swiftconcurrencyplaybook.com/?

    #swiftlang #swiftconcurrency

  3. 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.

    avanderlee.com/swift/async-awa

    #swiftlang #swiftconcurrency

  4. 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:

    swiftconcurrencyplaybook.com/?

    #swiftlang #swiftconcurrency

  5. 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:

    swiftconcurrencyplaybook.com/?

    #swiftlang #swiftconcurrency

  6. 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.

    avanderlee.com/swift/async-awa

    #swiftlang #swiftconcurrency

  7. 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:

    swiftconcurrencyplaybook.com/?

    #swiftlang #swiftconcurrency

  8. 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:

    avanderlee.com/swift/async-awa

    #swiftlang #swiftconcurrency

  9. @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 🤓

  10. @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 🤓

  11. “… 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!

    #SwiftConcurrency

  12. “… 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!

    #SwiftConcurrency

  13. 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 forge.younata.com/you/AsyncExt

    Probably the most interesting thing there is AsyncMultiChannel. Which is like github.com/apple/swift-async-a, 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.

    #SwiftLang #SwiftConcurrency

  14. 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 forge.younata.com/you/AsyncExt

    Probably the most interesting thing there is AsyncMultiChannel. Which is like github.com/apple/swift-async-a, 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.

    #SwiftLang #SwiftConcurrency

  15. 🚀 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: github.com/malhal/swift-stream

    #SwiftConcurrency #SwiftMacros #OpenSource

  16. 🚀 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: github.com/malhal/swift-stream

    #SwiftConcurrency #SwiftMacros #OpenSource

  17. 🤦‍♂️ "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! 🎉
    fuckingapproachableswiftconcur #SwiftConcurrency #Understanding #DeveloperJargon #TechTranslation #CodingHumor #DeveloperCommunity #HackerNews #ngated

  18. 🤦‍♂️ "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! 🎉
    fuckingapproachableswiftconcur #SwiftConcurrency #Understanding #DeveloperJargon #TechTranslation #CodingHumor #DeveloperCommunity #HackerNews #ngated

  19. 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!

    krishna.github.io/posts/unders

    #swift #concurrency #swiftconcurrency #swift6

  20. 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!

    krishna.github.io/posts/unders

    #swift #concurrency #swiftconcurrency #swift6

  21. Notifications crashing with concurrency errors? Replace unsafe 𝑛𝑜𝑡𝑖𝑓𝑦() calls with 𝘔𝘢𝘪𝘯𝘈𝘤𝘵𝘰𝘳𝘔𝘦𝘴𝘴𝘢𝘨𝘦 and 𝘈𝘴𝘺𝘯𝘤𝘔𝘦𝘴𝘴𝘢𝘨𝘦. Thread-safe, modern, and built for async/await.

    🔗 avanderlee.com/concurrency/mai by Antoine van der Lee (@swiftlee)

    #Concurrency #SwiftConcurrency #iOS

  22. 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.

    🔗: massicotte.org/step-by-step-co by Matt Massicotte (@mattiem)

    #SwiftConcurrency #Swift #iOSDev

  23. 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.

    🔗: massicotte.org/singletons by Matt Massicotte (@mattiem)

    #Swift #Concurrency #iOSDev #SwiftConcurrency

  24. 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.

    🔗: massicotte.org/singletons by Matt Massicotte (@mattiem)

    #Swift #Concurrency #iOSDev #SwiftConcurrency

  25. 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.

    🔗: avanderlee.com/concurrency/swi by Antoine van der Lee (@swiftlee)

    #Swift #iOSDev #Concurrency #SwiftConcurrency

  26. 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!

    🔗: fatbobman.com/en/posts/mainact by @fatbobman

    #Swift6 #SwiftConcurrency #iOSDevelopment #MainActor

  27. 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!

    🔗: fatbobman.com/en/posts/mainact by @fatbobman

    #Swift6 #SwiftConcurrency #iOSDevelopment #MainActor

  28. 🧩 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 📊
    👉 fatbobman.com/en/posts/sendabl
    #Swift #iOSDev #SwiftConcurrency

  29. 🧩 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 📊
    👉 fatbobman.com/en/posts/sendabl
    #Swift #iOSDev #SwiftConcurrency

  30. 🗓️ Saturday, July 5, 11:30am Pacific, 18:30 UTC
    Swift Concurrency, Group Learning Session: Parallelization of Tasks

    In 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
    discord.gg/euyXVzzX?event=1388

  31. 🗓️ Saturday, July 5, 11:30am Pacific, 18:30 UTC
    Swift Concurrency, Group Learning Session: Parallelization of Tasks

    In 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
    discord.gg/euyXVzzX?event=1388

  32. ✨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

    github.com/swiftlang/swift-evo

  33. 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.

    blog.rachelbrindle.com/2025/06

    #SwiftLang

  34. 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.

    blog.rachelbrindle.com/2025/06

    #SwiftLang

  35. 📣 #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: massicotte.org/default-isolati

    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! 👏

  36. 📣 #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: massicotte.org/default-isolati

    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! 👏

  37. 🗓️ 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:
    discord.gg/sGM552KyMn?event=13

  38. 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
    discord.gg/sGM552KyMn?event=13

  39. 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

  40. 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

  41. 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!)

    #TriMet #Portland