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

Improve the reliability of windows time based actions #145

Merged
merged 9 commits into from
Sep 1, 2024

Conversation

TrentHouliston
Copy link
Member

@TrentHouliston TrentHouliston commented Aug 31, 2024

Occasionally in CI, the chrono controller would fail to stop and continue to run even after shutdown had happened.

Looking at the traces it seems that the shutdown from chrono controller stays running forever as well as chrono controller continuing to emit tasks.

The only way this could happen is if shutdown failed to acquire the mutex forever.

By setting running to false first outside of the mutex the main chrono thread should stop emitting tasks if it's looping.

If it's sleeping on the condition variable then locking the mutex then notifying should ensure it wakes up.

Also when windows ran tests, often they would time out.
This was because the timer that was used for sleeping would often vastly overestimate the amount of sleep time.
For example, the sleep for 1ms tests were often sleeping for 15 to 30ms instead.

@TrentHouliston TrentHouliston changed the title Make chrono controller stop running before locking Improve the reliability of windows time based actions Sep 1, 2024
@TrentHouliston TrentHouliston merged commit f72e7c4 into main Sep 1, 2024
9 of 12 checks passed
@TrentHouliston TrentHouliston deleted the houliston/stop-first branch September 1, 2024 08:50
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