[core] Only one LambdaRuntime.run() can be called at a time (fix #507)#508
Merged
sebsto merged 47 commits intoawslabs:mainfrom Jul 4, 2025
Merged
[core] Only one LambdaRuntime.run() can be called at a time (fix #507)#508sebsto merged 47 commits intoawslabs:mainfrom
LambdaRuntime.run() can be called at a time (fix #507)#508sebsto merged 47 commits intoawslabs:mainfrom
Conversation
Collaborator
Author
|
Compiler crashes on nightly build has been reported here |
Collaborator
Author
|
CI is now green, except API Breakage, which is expected. |
fabianfett
suggested changes
Mar 17, 2025
Collaborator
fabianfett
left a comment
There was a problem hiding this comment.
Great spot! Thanks for tackling this one.
fabianfett
reviewed
Mar 19, 2025
Make the atomix check on run() instead of init()
…untime into sebsto/fix_507
Collaborator
Author
|
@fabianfett
|
Collaborator
Author
adam-fowler
reviewed
Jun 30, 2025
adam-fowler
approved these changes
Jul 4, 2025
Collaborator
adam-fowler
left a comment
There was a problem hiding this comment.
Looks good, only a couple of minor issues
Co-authored-by: Adam Fowler <adamfowler71@gmail.com>
Co-authored-by: Adam Fowler <adamfowler71@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a proposal to fix issue #507
changes
LambdaRuntime.init()uses aMutex<Bool>to make sure only one instance is createdLambdaRuntime.init()can now throw an error in case an instance already exists (I did not usefatalError()to make it easier to test)convenience init()methods catch possible errors instead of re-throwing it to a void breaking the user-facing APILambdaRuntimeErrortoLambdaRuntimeClientErrorLambdaRuntimeErrorto represent the double initialization error