Slightly unhinged and very incorrect, but probably still useful

actor: lock
isolation: which specific lock
nonisolated: no lock
Sendable: thread safe
non-Sendable: not thread safe
async: I might wait
await: I'm waiting, maybe just for a lock
Task: thread
compiler: pedantic, paranoid code reviewer

@mattiem semaphore?
@martind Are you asking why I didn’t mention that?
@mattiem No. This was my brain fart from your post. Keep going. 😉
@martind The challenge was to fit it all into one post. I think I did ok, but the limit made it tricky.
@mattiem very paranoid indeed
@esnssr the difference between “probably safe” and “definitely safe”

@mattiem

> compiler: pedantic, paranoid code reviewer

It really needs to chill.

@a_grebenyuk I do not see a way to make this happen

@mattiem that's my main problem with it – Apple went for a claim of 100% data race safety, which forced some unfortunate design choices, and now it feels like a giant waste of time for probably most applications.

I try not to rant about it too much, but it's OK once in a while, right?

@a_grebenyuk Rant all you want!

@a_grebenyuk Reflecting, I think this might have come off dismissive and I didn’t mean that.

What I meant was ranting is fine, and I actually often find it quite useful. But if you want to have a discussion with me specially (which I’m not sure is always a given with a social media reply), then I’m very up for it!

@mattiem that was the whole rant 😜
@a_grebenyuk Well if you come up with more lay it on me. Or better yet, blog about it. I find it very interesting and helpful to hear about the problems.
@mattiem I thought nonisolated is still a lock but different?
@krzyzanowskim Why did you think that?
@mattiem you told me. something along the nonisolated method is not isolated for this actor, but is isolated in some global actor
@krzyzanowskim Then I made a mistake, and I’m very sorry about that. nonisolated means no isolation. No actor, no protection from them.
@mattiem @krzyzanowskim I think the other would be isolated(any), right?
@mattiem uhm. I found this scrach of discussion, that I think was where I got that idea https://mastodon.social/@mattiem/112933835219899793

@krzyzanowskim reading it again, I get why I said that. But, obviously more confusing than is was worth. I've experimented with a number of different ways to explain things and not all have worked out well.

Very sorry about that. The topic is hard enough without stuff like this being thrown around.

It is much better to just know that "nonisolated" means "no static isolation" and not think about it in terms of any other concept.

@mattiem thank you so much for sharing this! Is this information based on observation how it works at runtime or you’ve read some documentation? For example, I’ve read official docs (Concurrency section) and didn’t find explanation of nonisolated keyword.

@rbsgn Haha it’s quite something that this keyword isn’t in there.

I don’t even remember at this point how I leaned it. It’s not a direct explanation of the keyword specifically, but it is talked about here.

https://www.swift.org/migration/documentation/swift-6-concurrency-migration-guide/dataracesafety

I have never written anything about it directly myself…

Documentation

@mattiem `nonisolated` is just an example. I see you have good mental model of Concurrency, you can explain the topic with simple terms and it’s awesome! So awesome so I want to dig into Concurrency and have expertise. That’s why I ask you how you gained this knowledge!

@rbsgn Well I started by doing everything completely wrong!

If you are just getting started, I did a series a lot of people like that could be helpful:

https://www.massicotte.org/step-by-step-network-request

Concurrency Step-by-Step: A Network Request

Updated: Oct 5, 2025

massicotte.org
@mattiem Got it! I’ll start from Migration Guide and then continue reading your blog!
@rbsgn Let me know if anything comes up!