-
Notifications
You must be signed in to change notification settings - Fork 54
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
Conversation
9e51ca4
to
75fe1f2
Compare
There was a problem hiding this 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.
Some("check") => { | ||
Some("check-bfs") => { |
There was a problem hiding this comment.
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
.
.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)); | ||
}) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely an improvement: #77
Fixes #69
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