mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Replace yield_now with sleep 100 to prevent hammering a task, despite still being over-eager
This commit is contained in:
@@ -836,8 +836,8 @@ async fn handle_cosigns_and_batch_publication<D: Db, P: P2p>(
|
|||||||
) {
|
) {
|
||||||
let mut tributaries = HashMap::new();
|
let mut tributaries = HashMap::new();
|
||||||
'outer: loop {
|
'outer: loop {
|
||||||
// TODO: Create a better async flow for this, as this does still hammer this task
|
// TODO: Create a better async flow for this
|
||||||
tokio::task::yield_now().await;
|
tokio::time::sleep(core::time::Duration::from_millis(100)).await;
|
||||||
|
|
||||||
match tributary_event.try_recv() {
|
match tributary_event.try_recv() {
|
||||||
Ok(event) => match event {
|
Ok(event) => match event {
|
||||||
|
|||||||
Reference in New Issue
Block a user