Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LambdaContext #345

Merged
merged 3 commits into from
Aug 29, 2024
Merged

Conversation

aryan-25
Copy link
Contributor

Motivation:

As outlined in the v2 API proposal (#339), the eventLoop and allocator properties are to be removed from LambdaContext. The detachedBackgroundTask(_:) function and the associated tasks property are also not needed since the v2 API will introduce handlers that support background task execution through a writer passed to the handler.

Modifications:

Introduced NewLambdaContext: exactly the same as LambdaContext but without the eventLoop, allocator, and tasks properties, and the detachedBackgroundTask(_:) function.

LambdaContext was not modified directly in order to keep the current functionality untouched.

Result:

NewLambdaContext can be used to continue implementing the new API.

@fabianfett fabianfett merged commit 4121b35 into swift-server:main Aug 29, 2024
10 of 13 checks passed
@fabianfett fabianfett added this to the 2.0 milestone Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants