diff --git a/Cargo.lock b/Cargo.lock index 022e7c66..fdd5c578 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1298,7 +1298,7 @@ dependencies = [ [[package]] name = "deduped_broadcast" -version = "0.2.0" +version = "0.2.1" dependencies = [ "lru", "serde", diff --git a/deduped_broadcast/Cargo.toml b/deduped_broadcast/Cargo.toml index f6e79115..18e2c01f 100644 --- a/deduped_broadcast/Cargo.toml +++ b/deduped_broadcast/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deduped_broadcast" -version = "0.2.0" +version = "0.2.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/deduped_broadcast/src/lib.rs b/deduped_broadcast/src/lib.rs index 29936ca0..1ff058ba 100644 --- a/deduped_broadcast/src/lib.rs +++ b/deduped_broadcast/src/lib.rs @@ -8,6 +8,7 @@ use std::{ hash::{Hash, Hasher}, }; use tokio::sync::{broadcast, mpsc}; +use tokio::task::yield_now; struct DedupedBroadcasterTask where @@ -58,6 +59,8 @@ where self.total_broadcasts.fetch_add(x, Ordering::Relaxed); } }); + + yield_now().await; } } }