Skip to content
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

fix: fast shutdown #4

Merged
merged 1 commit into from
Jan 29, 2025
Merged

fix: fast shutdown #4

merged 1 commit into from
Jan 29, 2025

Conversation

ankush
Copy link
Member

@ankush ankush commented Jan 29, 2025

Break the poller wait by using shutdown event to let it know its time to wake up.

Steps to reproduce:

  • Start a gthread worker
  • Send SIGTERM to it (not ctrl+C, that sends sigint and exits ungracefully)
  • It will be blocked for unpredictable amount of time.

Fix: Use eventfd (linux specific) to wake up the poller by writing to this fd.

Break the poller wait by using shutdown event to let it know its time to wake up.
@ankush ankush marked this pull request as ready for review January 29, 2025 06:24
@ankush ankush merged commit d526033 into frappe:master Jan 29, 2025
12 of 13 checks passed
@ankush ankush deleted the fast_shutdown branch January 29, 2025 06:28
ankush added a commit that referenced this pull request Jan 29, 2025
Break the poller wait by using shutdown event to let it know its time to wake up.
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