File tree 2 files changed +4
-1
lines changed
Sources/AWSLambdaRuntimeCore
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ let package = Package(
19
19
dependencies: [
20
20
. package ( url: " https://github.com/apple/swift-nio.git " , from: " 2.76.0 " ) ,
21
21
. package ( url: " https://github.com/apple/swift-log.git " , from: " 1.5.4 " ) ,
22
+ . package ( url: " https://github.com/swift-server/swift-service-lifecycle.git " , from: " 2.6.3 " ) ,
22
23
] ,
23
24
targets: [
24
25
. target(
@@ -36,6 +37,7 @@ let package = Package(
36
37
. product( name: " NIOCore " , package : " swift-nio " ) ,
37
38
. product( name: " NIOConcurrencyHelpers " , package : " swift-nio " ) ,
38
39
. product( name: " NIOPosix " , package : " swift-nio " ) ,
40
+ . product( name: " ServiceLifecycle " , package : " swift-service-lifecycle " ) ,
39
41
] ,
40
42
swiftSettings: [ . swiftLanguageMode( . v5) ]
41
43
) ,
Original file line number Diff line number Diff line change 15
15
import Logging
16
16
import NIOConcurrencyHelpers
17
17
import NIOCore
18
+ import ServiceLifecycle
18
19
19
20
#if canImport(FoundationEssentials)
20
21
import FoundationEssentials
@@ -25,7 +26,7 @@ import Foundation
25
26
// We need `@unchecked` Sendable here, as `NIOLockedValueBox` does not understand `sending` today.
26
27
// We don't want to use `NIOLockedValueBox` here anyway. We would love to use Mutex here, but this
27
28
// sadly crashes the compiler today.
28
- public final class LambdaRuntime < Handler> : @unchecked Sendable where Handler: StreamingLambdaHandler {
29
+ public final class LambdaRuntime < Handler> : Service , @unchecked Sendable where Handler: StreamingLambdaHandler {
29
30
// TODO: We want to change this to Mutex as soon as this doesn't crash the Swift compiler on Linux anymore
30
31
let handlerMutex : NIOLockedValueBox < Handler ? >
31
32
let logger : Logger
You can’t perform that action at this time.
0 commit comments