mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-15 10:48:33 +01:00
Fix codereview comments for r496
This commit is contained in:
parent
088d298c7d
commit
d5762bbbd7
@ -58,9 +58,7 @@ quint64 AlbumCoverLoader::LoadImageAsync(const QString& art_automatic,
|
||||
}
|
||||
|
||||
void AlbumCoverLoader::ProcessTasks() {
|
||||
forever {
|
||||
if (stop_requested_) return;
|
||||
|
||||
while (!stop_requested_) {
|
||||
// Get the next task
|
||||
Task task;
|
||||
{
|
||||
|
@ -137,8 +137,8 @@ BackgroundThread<InterfaceType>::BackgroundThread(QObject *parent)
|
||||
template <typename InterfaceType>
|
||||
BackgroundThread<InterfaceType>::~BackgroundThread() {
|
||||
if (isRunning()) {
|
||||
if (worker_) // Possible race condition here
|
||||
worker_->Stop();
|
||||
if (boost::shared_ptr<InterfaceType> w = worker_)
|
||||
w->Stop();
|
||||
|
||||
quit();
|
||||
if (wait(10000))
|
||||
|
Loading…
Reference in New Issue
Block a user