swift
e650dc00 - [Distributed] Distributed thunks take parameters as 'sending'

Commit
1 year ago
[Distributed] Distributed thunks take parameters as 'sending' This is in order to avoid errors in complete concurrency checking mnode in distributed funcs, or rather their thunks, as there is isolation boundary crossing happening when we pass a value to a distributed func. This is because as we do this, we pass it to a nonisolated thunk: ``` nonisolated func THUNK(param: Thing) { if remote { ... } else { await self.realFunc(param) } } ``` So what happens here is that the Thing would become isolated to the task and we get a bad isolation crossing as we pass it along to the "real func". Sending values into the distributed thunk is the right thing to do to resolve this problem: `nonisolated func THUNK(param: sending Thing) {}` Resolves rdar://126577527
Author
Committer
Parents
Loading