Less aggressive polling
This commit is contained in:
parent
2f2fdf9056
commit
2cbb249c46
1 changed files with 4 additions and 1 deletions
|
@ -129,7 +129,10 @@ impl Scanner {
|
||||||
index_builder.add_song(song);
|
index_builder.add_song(song);
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
Err(TryRecvError::Empty) => false,
|
Err(TryRecvError::Empty) => {
|
||||||
|
std::thread::sleep(Duration::from_millis(1));
|
||||||
|
false
|
||||||
|
}
|
||||||
Err(TryRecvError::Disconnected) => true,
|
Err(TryRecvError::Disconnected) => true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue