[Concurrency/Distributed] nonisolated-nonsending by default breaks distributed thunks

the new NonisolatedNonsendingByDefault upcoming feature breaks remote
calls in distributed actors, because the expected isolation doesn't
match and the runtime swift_distributed_execute_target_resume will
crash.

This is a short term fix to unblock adopters, however preferably we
should mark the thunks as nonisolated(nonsending), though that seems to
be more involved.

resolves rdar://159247975
This commit is contained in:
Konrad Malawski
2025-08-27 18:42:43 +09:00
parent 5f20a5b8b5
commit 011d2d2edc
6 changed files with 95 additions and 2 deletions

View File

@@ -737,6 +737,7 @@ static FuncDecl *createSameSignatureDistributedThunkDecl(DeclContext *DC,
thunk->setSynthesized(true);
thunk->setDistributedThunk(true);
// TODO(distributed): These would benefit from becoming nonisolated(nonsending)
thunk->getAttrs().add(NonisolatedAttr::createImplicit(C));
return thunk;