Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ DerivedData/
.netrc
Package.resolved
.swiftpm/xcode/
.vscode
.swift-version
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import PackageDescription
let extraSettings: [SwiftSetting] = [
.enableExperimentalFeature("SuppressedAssociatedTypes"),
.enableExperimentalFeature("LifetimeDependence"),
.enableExperimentalFeature("NonescapableTypes"),
.enableUpcomingFeature("LifetimeDependence"),
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
.enableUpcomingFeature("InferIsolatedConformances"),
Expand Down
6 changes: 6 additions & 0 deletions Sources/HTTPServer/HTTPRequestConcludingAsyncReader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,9 @@ public struct HTTPRequestConcludingAsyncReader: ConcludingAsyncReader {
return (result, partsReader.trailers)
}
}

@available(*, unavailable)
extension HTTPRequestConcludingAsyncReader: Sendable { }

@available(*, unavailable)
extension HTTPRequestConcludingAsyncReader.RequestBodyAsyncReader: Sendable { }
6 changes: 6 additions & 0 deletions Sources/HTTPServer/HTTPResponseConcludingAsyncWriter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,9 @@ public struct HTTPResponseConcludingAsyncWriter: ConcludingAsyncWriter, ~Copyabl
return result
}
}

@available(*, unavailable)
extension HTTPResponseConcludingAsyncWriter: Sendable { }

@available(*, unavailable)
extension HTTPResponseConcludingAsyncWriter.ResponseBodyAsyncWriter: Sendable { }
2 changes: 1 addition & 1 deletion Sources/HTTPServer/HTTPServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import SwiftASN1
/// }
/// ```
@available(macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *)
public final class Server<RequestHandler: HTTPServerRequestHandler> {
public final class Server<RequestHandler: HTTPServerRequestHandler>: Sendable {
/// Starts an HTTP server with a closure-based request handler.
///
/// This method provides a convenient way to start an HTTP server using a closure to handle incoming requests.
Expand Down
2 changes: 1 addition & 1 deletion Sources/HTTPServer/HTTPServerClosureRequestHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public import HTTPTypes
/// }
/// ```
@available(macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0, *)
public struct HTTPServerClosureRequestHandler: HTTPServerRequestHandler {
public struct HTTPServerClosureRequestHandler: HTTPServerRequestHandler, Sendable {
/// The underlying closure that handles HTTP requests
private let _handler:
@Sendable (
Expand Down
2 changes: 1 addition & 1 deletion Sources/Middleware/MiddlewareBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// }
/// ```
@resultBuilder
public struct MiddlewareChainBuilder {
public struct MiddlewareChainBuilder: Sendable {
/// Builds a middleware chain from a single middleware component.
///
/// This is the base case for the result builder pattern, handling a single middleware.
Expand Down
3 changes: 3 additions & 0 deletions Sources/Middleware/MiddlewareChain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ public struct MiddlewareChain<Input, NextInput>: Middleware {
try await middlewareFunc(input, next)
}
}

@available(*, unavailable)
extension MiddlewareChain: Sendable { }