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

Add checker timeout #70

Merged
merged 6 commits into from Mar 2, 2024
Merged

Add checker timeout #70

merged 6 commits into from Mar 2, 2024

Conversation

jeffa5
Copy link
Collaborator

@jeffa5 jeffa5 commented Jan 10, 2024

Fixes #69

  • DFS and BFS checkers use the shared job market, so they rely on the timeout now implemented within that.
  • Simulation checker does not use the job market, so relies on its own logic for timeout.

This has the benefit of doing a 'clean' shutdown for each checker type, clearing work to be done, rather than stopping them mid-flow.

This might be updated when the checkers get unified with DPOR #7

Copy link
Member

@jonnadal jonnadal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another welcome improvement! Thank you @jeffa5.

Comment on lines -360 to +361
Some("check") => {
Some("check-bfs") => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'lll follow up w/ a commit to ensure the check option also works to avoid breaking bench.sh.

Comment on lines +73 to +84
.spawn(move || loop {
let mut market = s1.market.lock();
let now = SystemTime::now();
if closing_time < now {
log::debug!("Reached timeout, triggering shutdown");
market.open = false;
}
if !market.open {
break;
}
sleep(Duration::from_secs(1));
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential future change: could sleep the delta at the beginning of the loop to avoid a wake-up every second.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely an improvement: #77

@jonnadal jonnadal merged commit 2d41aca into stateright:master Mar 2, 2024
1 check passed
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.

Checker timeout
2 participants