We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 33e851e + f1b1959 commit 7bb444dCopy full SHA for 7bb444d
Cargo.toml
@@ -1,6 +1,6 @@
1
[package]
2
name = "scheduler"
3
-version = "0.2.0"
+version = "0.2.1"
4
edition = "2021"
5
authors = ["Yuekai Jia <equation618@gmail.com>"]
6
description = "Various scheduler algorithms in a unified interface"
src/cfs.rs
@@ -175,6 +175,9 @@ impl<T> BaseScheduler for CFScheduler<T> {
175
176
fn task_tick(&mut self, current: &Self::SchedItem) -> bool {
177
current.task_tick();
178
+ if self.ready_queue.is_empty() {
179
+ return false;
180
+ }
181
self.min_vruntime.is_none()
182
|| current.get_vruntime() > self.min_vruntime.as_mut().unwrap().load(Ordering::Acquire)
183
}
0 commit comments