pr9.4
This commit is contained in:
@@ -42,11 +42,14 @@ impl Scheduler {
|
||||
self.ready_queue.pop_front()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn is_ready_empty(&self) -> bool { self.ready_queue.is_empty() }
|
||||
#[cfg(test)]
|
||||
pub fn ready_len(&self) -> usize { self.ready_queue.len() }
|
||||
|
||||
// ---------- Current tracking (no switching here) ----------
|
||||
pub fn set_current(&mut self, coro: Option<HeapRef>) { self.current = coro; }
|
||||
#[cfg(test)]
|
||||
pub fn current(&self) -> Option<HeapRef> { self.current }
|
||||
pub fn clear_current(&mut self) { self.current = None; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user