Skip to content

feat(scheduler): Allow overlapping IoPauseGuards #4246

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

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

flub
Copy link
Contributor

@flub flub commented Mar 29, 2023

This enables using multiple pause guards at the same time.

Turns out this was a lot simpler then I thought.

#skip-changelog

This enables using multiple pause guards at the same time.
@flub flub requested review from link2xt and iequidoo March 29, 2023 16:39
src/scheduler.rs Outdated
@@ -199,8 +199,10 @@ impl SchedulerState {
#[derive(Debug, Default)]
struct InnerSchedulerState {
scheduler: Option<Scheduler>,
/// Whether IO should be started if there is no [`IoPauseGuard`] active.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like InnerSchedulerState should be an enum. With states like Started(Scheduler), Stopped and Paused({started: bool, paused: u32}).

@flub flub merged commit 91c10b3 into master Mar 30, 2023
@flub flub deleted the flub/overlapping-pause-guards branch March 30, 2023 10:40
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.

3 participants