Skip to content

Commit

Permalink
Replace yield_now with sleep 100 to prevent hammering a task, despite…
Browse files Browse the repository at this point in the history
… still being over-eager
  • Loading branch information
kayabaNerve committed Mar 9, 2024
1 parent 61a81e5 commit c93f6bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coordinator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,8 @@ async fn handle_cosigns_and_batch_publication<D: Db, P: P2p>(
) {
let mut tributaries = HashMap::new();
'outer: loop {
// TODO: Create a better async flow for this, as this does still hammer this task
tokio::task::yield_now().await;
// TODO: Create a better async flow for this
tokio::time::sleep(core::time::Duration::from_millis(100)).await;

match tributary_event.try_recv() {
Ok(event) => match event {
Expand Down

0 comments on commit c93f6bf

Please sign in to comment.