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

Wait for running jobs to finish #40

Merged
merged 13 commits into from
Jul 16, 2022
Merged

Conversation

imbolc
Copy link
Contributor

@imbolc imbolc commented Jul 12, 2022

#38

@Diggsey
Copy link
Owner

Diggsey commented Jul 13, 2022

Need a bit of extra time to review this

src/runner.rs Outdated
/// Wait for the jobs to finish, but not more than `timeout`
pub async fn wait_jobs_finish(&self, timeout: Duration) {
let start = Instant::now();
let step = Duration::from_millis(1);
Copy link
Owner

Choose a reason for hiding this comment

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

The step doesn't need to be this small, 10ms will give other tasks more time to run.

Copy link
Owner

Choose a reason for hiding this comment

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

Other than this, the changes look great 👍

@Diggsey Diggsey merged commit 75e12ba into Diggsey:master Jul 16, 2022
@imbolc imbolc deleted the signal-shutdown branch July 16, 2022 23:22
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.

2 participants