Skip to content

Commit

Permalink
Remove yield_now
Browse files Browse the repository at this point in the history
  • Loading branch information
akiradeveloper committed Nov 2, 2024
1 parent c7d23db commit 41cb7c9
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion sorock/src/process/thread/advance_kern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ impl Thread {
self.consumer.consume_events(Duration::from_secs(1)).await;
while self.advance_once().await.is_ok() {
self.producer.push_event(KernEvent);
tokio::task::yield_now().await;
}
}
};
Expand Down
1 change: 0 additions & 1 deletion sorock/src/process/thread/advance_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ impl Thread {
self.consumer.consume_events(Duration::from_secs(1)).await;
while self.advance_once().await.is_ok() {
self.producer.push_event(ApplicationEvent);
tokio::task::yield_now().await;
}
}
};
Expand Down
4 changes: 1 addition & 3 deletions sorock/src/process/thread/query_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ impl Thread {
self.consumer
.consume_events(Duration::from_millis(100))
.await;
while self.advance_once().await {
tokio::task::yield_now().await;
}
while self.advance_once().await {}
}
};
let hdl = tokio::spawn(fut).abort_handle();
Expand Down
1 change: 0 additions & 1 deletion sorock/src/process/thread/replication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ impl Thread {
self.consumer.consume_events(Duration::from_secs(1)).await;
while let Ok(true) = self.advance_once().await {
self.producer.push_event(ReplicationEvent);
tokio::task::yield_now().await;
}
}
};
Expand Down

0 comments on commit 41cb7c9

Please sign in to comment.