Skip to content

Commit 5eb37db

Browse files
authored
Make Server Sendable (#1623)
1 parent 2453b90 commit 5eb37db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/GRPC/Server.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ import Network
7979
/// HTTP2Frame.FramePayload│ │HTTP2Frame.FramePayload
8080
/// │ ▼
8181
///
82-
public final class Server {
82+
///- Note: This class is thread safe. It's marked as `@unchecked Sendable` because the non-Sendable
83+
/// `errorDelegate` property is mutated, but it's done thread-safely, as it only happens inside the `EventLoop`.
84+
public final class Server: @unchecked Sendable {
8385
/// Makes and configures a `ServerBootstrap` using the provided configuration.
8486
public class func makeBootstrap(configuration: Configuration) -> ServerBootstrapProtocol {
8587
let bootstrap = PlatformSupport.makeServerBootstrap(group: configuration.eventLoopGroup)

0 commit comments

Comments
 (0)