Skip to content

Commit 41cb7c9

Browse files
Remove yield_now
1 parent c7d23db commit 41cb7c9

File tree

4 files changed

+1
-6
lines changed

4 files changed

+1
-6
lines changed

sorock/src/process/thread/advance_kern.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ impl Thread {
2020
self.consumer.consume_events(Duration::from_secs(1)).await;
2121
while self.advance_once().await.is_ok() {
2222
self.producer.push_event(KernEvent);
23-
tokio::task::yield_now().await;
2423
}
2524
}
2625
};

sorock/src/process/thread/advance_user.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ impl Thread {
2121
self.consumer.consume_events(Duration::from_secs(1)).await;
2222
while self.advance_once().await.is_ok() {
2323
self.producer.push_event(ApplicationEvent);
24-
tokio::task::yield_now().await;
2524
}
2625
}
2726
};

sorock/src/process/thread/query_execution.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ impl Thread {
1919
self.consumer
2020
.consume_events(Duration::from_millis(100))
2121
.await;
22-
while self.advance_once().await {
23-
tokio::task::yield_now().await;
24-
}
22+
while self.advance_once().await {}
2523
}
2624
};
2725
let hdl = tokio::spawn(fut).abort_handle();

sorock/src/process/thread/replication.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ impl Thread {
2828
self.consumer.consume_events(Duration::from_secs(1)).await;
2929
while let Ok(true) = self.advance_once().await {
3030
self.producer.push_event(ReplicationEvent);
31-
tokio::task::yield_now().await;
3231
}
3332
}
3433
};

0 commit comments

Comments
 (0)