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 possible ordering issue if a callback blocks in button handler #6440

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

KevinOConnor
Copy link
Collaborator

Invoke button callbacks directly from the background thread. This ensures that button notifications are delivered and delivered in the correct order. Previously, if a callback blocked, it was possible a new update could start before the previous update was completed, which could lead to lost events or out of order events.

This issue was reported at:
https://klipper.discourse.group/t/query-button-unreliable/11452
https://klipper.discourse.group/t/bug-found-with-gcode-button/11932

-Kevin

Invoke button callbacks directly from the background thread.  This
ensures that button notifications are delivered and delivered in the
correct order.  Previously, if a callback blocked, it was possible a
new update could start before the previous update was completed, which
could lead to lost events or out of order events.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
@KevinOConnor KevinOConnor merged commit 92fe8f1 into master Jan 2, 2024
2 checks passed
@KevinOConnor KevinOConnor deleted the work-buttons-20231229 branch January 2, 2024 16: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.

None yet

1 participant