Skip to content

Port signal to async/await#564

Merged
olix0r merged 1 commit intomaster-tokio-0.2from
ver/signal
Jun 15, 2020
Merged

Port signal to async/await#564
olix0r merged 1 commit intomaster-tokio-0.2from
ver/signal

Conversation

@olix0r
Copy link
Member

@olix0r olix0r commented Jun 14, 2020

No description provided.

@olix0r olix0r requested a review from a team June 14, 2020 23:40
Comment on lines +15 to +21
pub(super) async fn shutdown() {
tokio::select! {
// SIGINT - To allow Ctrl-c to emulate SIGTERM while developing.
() = sig(SignalKind::interrupt(), "SIGINT") => {}
// SIGTERM - Kubernetes sends this to start a graceful shutdown.
() = sig(SignalKind::terminate(), "SIGTERM") => {}
};
Copy link
Contributor

Choose a reason for hiding this comment

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

lovely :)

Copy link
Contributor

@kleimkuhler kleimkuhler left a comment

Choose a reason for hiding this comment

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

👍

@olix0r olix0r merged commit 66aa812 into master-tokio-0.2 Jun 15, 2020
@olix0r olix0r deleted the ver/signal branch June 15, 2020 17:29
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.

3 participants