mirror of
https://github.com/serai-dex/serai.git
synced 2025-01-03 09:29:46 +00:00
Replace yield_now with sleep 100 to prevent hammering a task, despite still being over-eager
This commit is contained in:
parent
61a81e53e1
commit
c93f6bf901
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue