Skip to content

Commit 6ce7249

Browse files
glbrnttWendellXY
authored andcommitted
Make request/response parts conditionally sendable (grpc#1523)
Motivation: The request/response parts are conditionally sendable based on their request/response payload. They are not currently marked as such which causes warnings in tests. Modifications: - Add conditional sendable conformance to request/response parts Results: Fewer warnings.
1 parent feba911 commit 6ce7249

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/GRPC/Interceptor/MessageParts.swift

+7
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,10 @@ extension GRPCServerResponsePart {
9999
}
100100
}
101101
}
102+
103+
#if swift(>=5.6)
104+
extension GRPCClientRequestPart: Sendable where Request: Sendable {}
105+
extension GRPCClientResponsePart: Sendable where Response: Sendable {}
106+
extension GRPCServerRequestPart: Sendable where Request: Sendable {}
107+
extension GRPCServerResponsePart: Sendable where Response: Sendable {}
108+
#endif

0 commit comments

Comments
 (0)