diff --git a/Package.swift b/Package.swift index d98c626..e3a7472 100644 --- a/Package.swift +++ b/Package.swift @@ -10,6 +10,9 @@ var swiftSettings: [SwiftSetting] = [ // https://github.com/swiftlang/swift-evolution/blob/main/proposals/0409-access-level-on-imports.md .enableUpcomingFeature("InternalImportsByDefault"), + + // https://github.com/swiftlang/swift-evolution/blob/main/proposals/0461-async-function-isolation.md + .enableUpcomingFeature("NonisolatedNonsendingByDefault"), ] let package = Package( diff --git a/Sources/HBLambdaTest/maths.swift b/Sources/HBLambdaTest/maths.swift index d23b119..f535a0d 100644 --- a/Sources/HBLambdaTest/maths.swift +++ b/Sources/HBLambdaTest/maths.swift @@ -16,10 +16,10 @@ typealias AppRequestContext = BasicLambdaRequestContext struct DebugMiddleware: RouterMiddleware { typealias Context = AppRequestContext - func handle( + @concurrent func handle( _ request: Request, context: Context, - next: (Request, Context) async throws -> Output + next: @concurrent (Request, Context) async throws -> Output ) async throws -> Output { context.logger.debug("\(request.method) \(request.uri)") context.logger.debug("\(context.event)")