Skip to content

Commit 39a2d33

Browse files
author
Joel Saltzman
authored
Merge pull request #1 from saltzmanjoelh/saltzmanjoelh-completeWithTask
Renamed completeWithAsync to completeWithTask
2 parents 48dc507 + f215e56 commit 39a2d33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/AWSLambdaRuntimeCore/LambdaHandler.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public protocol AsyncLambdaHandler: EventLoopLambdaHandler {
115115
extension AsyncLambdaHandler {
116116
public func handle(context: Lambda.Context, event: In) -> EventLoopFuture<Out> {
117117
let promise = context.eventLoop.makePromise(of: Out.self)
118-
promise.completeWithAsync {
118+
promise.completeWithTask {
119119
try await self.handle(event: event, context: context)
120120
}
121121
return promise.futureResult
@@ -127,7 +127,7 @@ extension AsyncLambdaHandler {
127127
public static func main() {
128128
Lambda.run { context -> EventLoopFuture<ByteBufferLambdaHandler> in
129129
let promise = context.eventLoop.makePromise(of: ByteBufferLambdaHandler.self)
130-
promise.completeWithAsync {
130+
promise.completeWithTask {
131131
try await Self(context: context)
132132
}
133133
return promise.futureResult

0 commit comments

Comments
 (0)