home.social

#swiftconcurrency — Public Fediverse posts

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

fetched live
  1. Moving code into an actor removes the data race. It does not make your function atomic.

    Actors are reentrant by design. Every await inside an actor method releases the actor, so another task can enter, run, mutate and finish before your function resumes.

    The classic shape is a cache: two callers miss the same key, both start the download, the second write clobbers the first. No crash, just twice the traffic.

    Store the in-flight Task, not only the result.

    #Swift #SwiftConcurrency #iOSDev

  2. Moving code into an actor removes the data race. It does not make your function atomic.

    Actors are reentrant by design. Every await inside an actor method releases the actor, so another task can enter, run, mutate and finish before your function resumes.

    The classic shape is a cache: two callers miss the same key, both start the download, the second write clobbers the first. No crash, just twice the traffic.

    Store the in-flight Task, not only the result.

    #Swift #SwiftConcurrency #iOSDev

  3. Moving code into an actor removes the data race. It does not make your function atomic.

    Actors are reentrant by design. Every await inside an actor method releases the actor, so another task can enter, run, mutate and finish before your function resumes.

    The classic shape is a cache: two callers miss the same key, both start the download, the second write clobbers the first. No crash, just twice the traffic.

    Store the in-flight Task, not only the result.

    #Swift #SwiftConcurrency #iOSDev

  4. Moving code into an actor removes the data race. It does not make your function atomic.

    Actors are reentrant by design. Every await inside an actor method releases the actor, so another task can enter, run, mutate and finish before your function resumes.

    The classic shape is a cache: two callers miss the same key, both start the download, the second write clobbers the first. No crash, just twice the traffic.

    Store the in-flight Task, not only the result.

    #Swift #SwiftConcurrency #iOSDev

  5. Moving code into an actor removes the data race. It does not make your function atomic.

    Actors are reentrant by design. Every await inside an actor method releases the actor, so another task can enter, run, mutate and finish before your function resumes.

    The classic shape is a cache: two callers miss the same key, both start the download, the second write clobbers the first. No crash, just twice the traffic.

    Store the in-flight Task, not only the result.

    #Swift #SwiftConcurrency #iOSDev

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  38. “… 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

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

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

  41. “… 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

  42. “… 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

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

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

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

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

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

  48. 🚀 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

  49. 🚀 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

  50. 🚀 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

  51. 🚀 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

  52. 🚀 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

  53. 🤦‍♂️ "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

  54. 🤦‍♂️ "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

  55. 🤦‍♂️ "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

  56. 🤦‍♂️ "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