I’m having crazy horrible ideas that will make me lose my job before Sonet 4.6, but here I go: can I check at runtime where the current scope is executing? I.e. I want a boolean that represents if it’s in the main thread, or not #iosProgramming #swiftConcurrency

🚀 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

#SwiftConcurrency #SwiftMacros #OpenSource

GitHub - malhal/swift-streamable-actors: Streamable Actors for Swift

Streamable Actors for Swift. Contribute to malhal/swift-streamable-actors development by creating an account on GitHub.

GitHub

Looked at code using Swift Concurrency:

Immediately found a bug:

state = .working(progress: 0)
await doSomething() { percent in
state = .working(progress: percent)
}
state = .done

What’s the value of `state` now?
(“Surely `.done`” is the wrong answer)

#Swift #SwiftConcurrency #SC #VibeCoders

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

A no-bullshit guide to Swift concurrency. Learn async/await, actors, Sendable, and MainActor with simple mental models. No jargon, just clear explanations.

Fucking Approachable Swift Concurrency
Fucking Approachable Swift Concurrency

A no-bullshit guide to Swift concurrency. Learn async/await, actors, Sendable, and MainActor with simple mental models. No jargon, just clear explanations.

Fucking Approachable Swift Concurrency

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/

#swift #concurrency #swiftconcurrency #swift6

Understanding Data Races: A Visual Guide for Swift Developers

Thoughts about Software and Building Software

Krishna's Blog

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)

#Concurrency #SwiftConcurrency #iOS

MainActorMessage & AsyncMessage: Concurrency-safe notifications

Dive into notifications and Swift concurrency. Discover the updated notification API that ensures thread safety.

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)

#SwiftConcurrency #Swift #iOSDev

Concurrency Step-by-Step: Conforming to Protocols

If there’s one topic that I find intimidating, it’s protocols. They are very powerful and in extremely wide use. But I’m sitting here, trying to figure out how to lead into this discussion and I’m already getting overwhelmed. That’s because protocols can be incredibly complicated.

massicotte.org

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)

#Swift #Concurrency #iOSDev #SwiftConcurrency

Singletons with Swift Concurrency

I see singletons used a lot in Swift projects. These things are, by definition, global state. That means they can be accessed from any context - any thread or actor - at any time. And this property makes them a common source of problems when used with Concurrency.

massicotte.org

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)

#Swift #iOSDev #Concurrency #SwiftConcurrency

Why Swift Migration Tooling Matters

Learn how to utilize Migration Tooling in Swift for adopting new features efficiently and avoiding common mistakes.

SwiftLee