Skip to content

Explicit shutdown support #3

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

marshallpierce
Copy link

Based on #2.

There is an argument to make logic bugs obvious via panics, but a panic that kills the driver thread will stall _all_ timers, whereas an unexpected code path that ends up in a signal value of some sort (e.g. zero duration) will only screw up one timer.

Plus, eventually finding a way to have zero panics will shrink code size on embedded systems.
When an immediate tidy shutdown is called for, Handle::shutdown() will tell the driver to wake all waiting timers and exit the thread.
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.

1 participant