This commit is contained in:
asonix 2024-01-07 10:09:06 -06:00
parent 65e165af49
commit 9ceb26bb5c
2 changed files with 2 additions and 2 deletions

View file

@ -452,7 +452,7 @@ where
loop {
tracing::trace!("heartbeat: looping");
count += 1;
count = count % yield_limit;
count %= yield_limit;
// yield every 8 iterations to be kind to other tasks
if count == 0 {

View file

@ -83,7 +83,7 @@ where
tracing::trace!("from_iterator: looping");
count += 1;
count = count % yield_count;
count %= yield_count;
yielder.yield_(res).await;