-
Notifications
You must be signed in to change notification settings - Fork 656
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 implementation of EventLoopGroup.shutdownGracefully to _NIOConcurrency #1879
Conversation
…Concurrency Signed-off-by: Si Beaumont <beaumont@apple.com>
Can one of the admins verify this patch? |
13 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good! Just two small notes in the diff.
@swift-nio-bot add to allowlist |
82b38b8
to
9be7f97
Compare
Adds a new extension to
EventLoopGroup
in_NIOConcurrency
to provide an asynchronousshutdownGracefully()
.Motivation
Shutting down an event loop was special because it used a completion handler and executed on a
DispatchQueue
because there would be no event loop to use anEventLoopFuture
.Now we have the new Swift concurrency features, we can provide an
async
shutdownGracefully
.Fixes #1878.
Modifications
Adds
EventLoopGroup.shutdownGracefully() async
and some code to use it inNIOAsyncAwaitDemo
.There's no obvious way to ask an ELG if it has been shutdown but I made the following local-only changes to verify that this performs as expected: