Daemonize the musicbrainz thread #217
11
src/tui/lib/external/musicbrainz/daemon/mod.rs
vendored
11
src/tui/lib/external/musicbrainz/daemon/mod.rs
vendored
@ -298,13 +298,22 @@ impl JobQueue {
|
|||||||
.or_else(|| self.background_queue.pop_front())
|
.or_else(|| self.background_queue.pop_front())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
fn push_back(&mut self, job: Job) {
|
fn push_back(&mut self, job: Job) {
|
||||||
match job.priority {
|
match job.priority {
|
||||||
#[cfg(test)]
|
|
||||||
JobPriority::Foreground => self.foreground_queue.push_back(job.instance),
|
JobPriority::Foreground => self.foreground_queue.push_back(job.instance),
|
||||||
JobPriority::Background => self.background_queue.push_back(job.instance),
|
JobPriority::Background => self.background_queue.push_back(job.instance),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GRCOV_EXCL_START
|
||||||
|
#[cfg(not(test))]
|
||||||
|
fn push_back(&mut self, job: Job) {
|
||||||
|
match job.priority {
|
||||||
|
JobPriority::Background => self.background_queue.push_back(job.instance),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// GRCOV_EXCL_STOP
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
Loading…
Reference in New Issue
Block a user