mirror of
https://github.com/librespot-org/librespot.git
synced 2025-01-07 17:24:04 +00:00
Make sure the ResampleWorker task_receiver is also drained on drop
This commit is contained in:
parent
0e3ffe5394
commit
bfb0366c90
1 changed files with 8 additions and 0 deletions
|
@ -288,6 +288,14 @@ impl ResampleWorker {
|
||||||
.ok();
|
.ok();
|
||||||
}
|
}
|
||||||
ResampleTask::Terminate => {
|
ResampleTask::Terminate => {
|
||||||
|
loop {
|
||||||
|
let drained = task_receiver.recv().ok();
|
||||||
|
|
||||||
|
if drained.is_none() {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
match thread::current().name() {
|
match thread::current().name() {
|
||||||
Some(name) => debug!("<ResampleWorker> [{name}] thread finished"),
|
Some(name) => debug!("<ResampleWorker> [{name}] thread finished"),
|
||||||
None => debug!("<ResampleWorker> thread finished"),
|
None => debug!("<ResampleWorker> thread finished"),
|
||||||
|
|
Loading…
Reference in a new issue