Less aggressive polling

This commit is contained in:
Antoine Gersant 2024-08-09 08:16:47 -07:00
parent 2f2fdf9056
commit 2cbb249c46

View file

@ -129,7 +129,10 @@ impl Scanner {
index_builder.add_song(song);
false
}
Err(TryRecvError::Empty) => false,
Err(TryRecvError::Empty) => {
std::thread::sleep(Duration::from_millis(1));
false
}
Err(TryRecvError::Disconnected) => true,
};