Skip to content

Commit 6439cc6

Browse files
committed
recover previous version of files
1 parent d8f6224 commit 6439cc6

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

Sources/AWSLambdaRuntime/FoundationSupport/Lambda+JSON.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ extension LambdaRuntime {
9595
decoder: JSONDecoder = JSONDecoder(),
9696
encoder: JSONEncoder = JSONEncoder(),
9797
logger: Logger = Logger(label: "LambdaRuntime"),
98-
body: @Sendable @escaping (Event, LambdaContext) async throws -> Output
98+
body: sending @escaping (Event, LambdaContext) async throws -> Output
9999
)
100100
where
101101
Handler == LambdaCodableAdapter<
@@ -122,7 +122,7 @@ extension LambdaRuntime {
122122
public convenience init<Event: Decodable>(
123123
decoder: JSONDecoder = JSONDecoder(),
124124
logger: Logger = Logger(label: "LambdaRuntime"),
125-
body: @Sendable @escaping (Event, LambdaContext) async throws -> Void
125+
body: sending @escaping (Event, LambdaContext) async throws -> Void
126126
)
127127
where
128128
Handler == LambdaCodableAdapter<

Sources/AWSLambdaRuntime/Lambda+Codable.swift

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import NIOCore
1616

1717
/// The protocol a decoder must conform to so that it can be used with ``LambdaCodableAdapter`` to decode incoming
1818
/// `ByteBuffer` events.
19-
public protocol LambdaEventDecoder: Sendable {
19+
public protocol LambdaEventDecoder {
2020
/// Decode the `ByteBuffer` representing the received event into the generic `Event` type
2121
/// the handler will receive.
2222
/// - Parameters:
@@ -28,7 +28,7 @@ public protocol LambdaEventDecoder: Sendable {
2828

2929
/// The protocol an encoder must conform to so that it can be used with ``LambdaCodableAdapter`` to encode the generic
3030
/// ``LambdaOutputEncoder/Output`` object into a `ByteBuffer`.
31-
public protocol LambdaOutputEncoder: Sendable {
31+
public protocol LambdaOutputEncoder {
3232
associatedtype Output
3333

3434
/// Encode the generic type `Output` the handler has returned into a `ByteBuffer`.
@@ -52,7 +52,7 @@ public struct LambdaHandlerAdapter<
5252
Event: Decodable,
5353
Output,
5454
Handler: LambdaHandler
55-
>: LambdaWithBackgroundProcessingHandler where Handler.Event == Event, Handler.Output == Output, Handler: Sendable {
55+
>: LambdaWithBackgroundProcessingHandler where Handler.Event == Event, Handler.Output == Output {
5656
@usableFromInline let handler: Handler
5757

5858
/// Initializes an instance given a concrete handler.
@@ -86,15 +86,7 @@ public struct LambdaCodableAdapter<
8686
Output,
8787
Decoder: LambdaEventDecoder,
8888
Encoder: LambdaOutputEncoder
89-
>: StreamingLambdaHandler
90-
where
91-
Handler.Event == Event,
92-
Handler.Output == Output,
93-
Encoder.Output == Output,
94-
Handler: Sendable,
95-
Decoder: Sendable,
96-
Encoder: Sendable
97-
{
89+
>: StreamingLambdaHandler where Handler.Event == Event, Handler.Output == Output, Encoder.Output == Output {
9890
@usableFromInline let handler: Handler
9991
@usableFromInline let encoder: Encoder
10092
@usableFromInline let decoder: Decoder

Tests/AWSLambdaRuntimeTests/PoolTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct PoolTests {
6060
let iterations = 1000
6161

6262
// Start consumer task first
63-
let consumer = Task { [iterations] in
63+
let consumer = Task { @Sendable in
6464
var receivedValues = Set<Int>()
6565
var count = 0
6666
for try await value in pool {
@@ -119,7 +119,7 @@ struct PoolTests {
119119
let messagesPerProducer = 1000
120120

121121
// Start consumer
122-
let consumer = Task { [producerCount, messagesPerProducer] in
122+
let consumer = Task { @Sendable in
123123
var receivedValues = [Int]()
124124
var count = 0
125125
for try await value in pool {

0 commit comments

Comments
 (0)