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

Add Async Lifecycle Handlers #3193

Merged
merged 11 commits into from
May 15, 2024
Merged

Add Async Lifecycle Handlers #3193

merged 11 commits into from
May 15, 2024

Conversation

0xTim
Copy link
Member

@0xTim 0xTim commented May 14, 2024

These changes are now available in 4.100.0

Adds new protocol functions to LifecycleHandlers to support async contexts. This is important because packages like Redis use this to know when to shutdown their connection pool. In the shutdown function, these call .wait() which can cause application crashes if called when trying to use NIO's event loop concurrency executor.

This provides async alternatives to allow packages to provide full async calls through their stack to avoid these crashes

@0xTim 0xTim added the semver-minor Contains new API label May 14, 2024
@0xTim 0xTim requested a review from gwynne as a code owner May 14, 2024 13:22
Copy link
Member

@gwynne gwynne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I absolutely hate this, but I don't have a better solution and it definitely needs addressing, so here we are 🤦‍♀️.

@0xTim
Copy link
Member Author

0xTim commented May 14, 2024

I absolutely hate this, but I don't have a better solution and it definitely needs addressing, so here we are 🤦‍♀️.

Yep been my feelings for a lot of the async work recently! 😅

@0xTim 0xTim merged commit 90da64a into main May 15, 2024
16 checks passed
@0xTim 0xTim deleted the async-lifecycle-handler branch May 15, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Contains new API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants