File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,11 @@ public protocol LambdaResponseWriter: ~Copyable {
208
208
` ByteBufferAllocator ` ) will be removed.
209
209
210
210
A new function ` addBackgroundTask(_:) ` will also be added. This will allow tasks to be run in the background while and after
211
- the response is/has been sent. Please note that ` LambdaContext ` will not be ` Sendable ` anymore.
211
+ the response is/has been sent. Please note that ` LambdaContext ` will not be ` Sendable ` anymore, because in order
212
+ to allow adding background tasks in a structured way, the ` LambdaContext ` will need to be backed with a ` TaskGroup ` .
213
+ Since ` TaskGroup ` is not ` Sendable ` we cannot mark ` LambdaContext ` as ` Sendable ` . If users need any property out of the
214
+ ` LambdaContext ` they can just extract the property and then pass it around or close over it as all the properties are
215
+ ` Sendable ` .
212
216
213
217
``` swift
214
218
/// A context object passed as part of an invocation in LambdaHandler handle functions.
You can’t perform that action at this time.
0 commit comments