Skip to content

Commit fe320d2

Browse files
tomerdfabianfettyim-lee
authored
Apply suggestions from code review
Co-authored-by: Fabian Fett <fabianfett@mac.com> Co-authored-by: Yim Lee <yim_lee@apple.com>
1 parent 28be2ee commit fe320d2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Sources/AWSLambdaRuntimeCore/LambdaContext.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ import NIO
2020

2121
extension Lambda {
2222
/// Lambda runtime initialization context.
23-
/// The Lambda runtime generates and passes the `InitializationContext` to the Lambda handler as an argument.
23+
/// The Lambda runtime generates and passes the `InitializationContext` to the Lambda factory as an argument.
2424
public final class InitializationContext {
2525
/// `Logger` to log with
2626
///
2727
/// - note: The `LogLevel` can be configured using the `LOG_LEVEL` environment variable.
2828
public let logger: Logger
2929

3030
/// The `EventLoop` the Lambda is executed on. Use this to schedule work with.
31-
/// This is useful when implementing the `EventLoopLambdaHandler` protocol.
3231
///
3332
/// - note: The `EventLoop` is shared with the Lambda runtime engine and should be handled with extra care.
3433
/// Most importantly the `EventLoop` must never be blocked.

Sources/AWSLambdaRuntimeCore/LambdaRunner.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ extension Lambda {
3939
let context = InitializationContext(logger: logger, eventLoop: self.eventLoop)
4040
return factory(context)
4141
// Hopping back to "our" EventLoop is importnant in case the factory returns a future
42-
// that originiated from a foreign EventLoop/EventLoopGroup.
43-
// This can happen if the factory uses a library (lets say a DB client) that manages its own threads/loops
42+
// that originated from a foreign EventLoop/EventLoopGroup.
43+
// This can happen if the factory uses a library (let's say a database client) that manages its own threads/loops
4444
// for whatever reason and returns a future that originated from that foreign EventLoop.
4545
.hop(to: self.eventLoop)
4646
.peekError { error in

0 commit comments

Comments
 (0)