diff --git a/src/runtime2/scheduler.rs b/src/runtime2/scheduler.rs index 2ed3f6eac8d91490b86f8752a7e9a99964a06d6e..9286998dd0f41e3ff8e36d78657323061b4a1bd4 100644 --- a/src/runtime2/scheduler.rs +++ b/src/runtime2/scheduler.rs @@ -1,3 +1,4 @@ +use std::sync::Arc; use std::sync::atomic::Ordering; use super::component::*; @@ -6,16 +7,16 @@ use super::communication::*; /// Data associated with a scheduler thread pub(crate) struct Scheduler { - runtime: RuntimeHandle, + runtime: Arc, scheduler_id: u32, } pub(crate) struct SchedulerCtx<'a> { - pub runtime: &'a Runtime, + pub runtime: &'a RuntimeInner, } impl<'a> SchedulerCtx<'a> { - pub fn new(runtime: &'a Runtime) -> Self { + pub fn new(runtime: &'a RuntimeInner) -> Self { return Self { runtime, } @@ -25,7 +26,7 @@ impl<'a> SchedulerCtx<'a> { impl Scheduler { // public interface to thread - pub fn new(runtime: RuntimeHandle, scheduler_id: u32) -> Self { + pub fn new(runtime: Arc, scheduler_id: u32) -> Self { return Scheduler{ runtime, scheduler_id } }