Skip to content

Commit

Permalink
Reorder trait methods semantically
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Nov 2, 2023
1 parent 2cac972 commit d4aee43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/src/installed_scheduler_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub trait InstalledSchedulerPool: Send + Sync + Debug {
)]
pub trait InstalledScheduler: Send + Sync + Debug + 'static {
fn id(&self) -> SchedulerId;
fn return_to_pool(self: Box<Self>);
fn context(&self) -> &SchedulingContext;

// Calling this is illegal as soon as wait_for_termination is called.
fn schedule_execution<'a>(
Expand All @@ -125,7 +125,7 @@ pub trait InstalledScheduler: Send + Sync + Debug + 'static {
#[must_use]
fn wait_for_termination(&mut self, reason: &WaitReason) -> Option<ResultWithTimings>;

fn context(&self) -> &SchedulingContext;
fn return_to_pool(self: Box<Self>);
}

pub type DefaultInstalledSchedulerBox = Box<dyn InstalledScheduler>;
Expand Down

0 comments on commit d4aee43

Please sign in to comment.