mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Concurrency/Distributed] ensure distributed thunks are @concurrent
Otherwise the "nonisolated nonsending by default" mode blows up as distributed thunk signatures dont match expectations. This undoes the fix from https://github.com/swiftlang/swift/pull/83940 and applies the fix on the synthesis side of the distributed thunks, such that they are @concurrent always -- which keeps their old semantics basically, regardless of what "default" mode we have.
This commit is contained in:
@@ -737,8 +737,11 @@ 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));
|
||||
// TODO(distributed): It would be nicer to make distributed thunks nonisolated(nonsending) instead;
|
||||
// this way we would not hop off the caller when calling system.remoteCall;
|
||||
// it'd need new ABI and the remoteCall also to become nonisolated(nonsending)
|
||||
thunk->getAttrs().add(new (C) ConcurrentAttr(/*IsImplicit=*/true));
|
||||
|
||||
return thunk;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user