Skip to content

How can we handle pre shutdown? #2646

Closed Answered by nggit
Takashi-kun asked this question in Q&A
Discussion options

You must be logged in to vote

Instead of blocking sleep, you can delay the original handler call with loop.call_later:

        if callable(original_handlers[signum]):
            loop.call_later(10, original_handlers[signum], signum, None)

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@Takashi-kun
Comment options

@nggit
Comment options

@Takashi-kun
Comment options

@nggit
Comment options

Answer selected by Takashi-kun
@Takashi-kun
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants