Skip to content

Commit 94208a5

Browse files
committed
fix(runtime): reduce current thread check in run()
1 parent 6f5f9bc commit 94208a5

File tree

1 file changed

+4
-1
lines changed
  • compio-runtime/src/runtime

1 file changed

+4
-1
lines changed

compio-runtime/src/runtime/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,11 @@ impl RuntimeInner {
9090
}
9191

9292
pub fn run(&self) {
93+
use std::ops::Deref;
94+
95+
let local_runnables = self.local_runnables.deref().deref();
9396
loop {
94-
let next_task = self.local_runnables.borrow_mut().pop_front();
97+
let next_task = local_runnables.borrow_mut().pop_front();
9598
let has_local_task = next_task.is_some();
9699
if let Some(task) = next_task {
97100
task.run();

0 commit comments

Comments
 (0)