mirror of
https://github.com/apple/swift-nio-extras.git
synced 2025-05-17 02:22:18 +08:00
Motivation: In a few cases quiescing a server application is useful but it's harder than necessary with core-NIO. Therefore this adds a helper & a demonstration. Modifications: - add `QuiescingHelper` which helps users to quiesce a channel by collecting all accepted channels and when needed sends them the quiescing user event. When all collected channels have closed the user will be notified and can just shut down the ELG. - added a demo implementation with a simple HTTP server that quiesces when receiving a signal Result: Make it quite easy to quiesce a server and show users how to do it.