1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-15 18:58:55 +01:00

Fix codereview comments for r496

This commit is contained in:
David Sansome 2010-03-25 14:47:41 +00:00
parent 088d298c7d
commit d5762bbbd7
2 changed files with 3 additions and 5 deletions

View File

@ -58,9 +58,7 @@ quint64 AlbumCoverLoader::LoadImageAsync(const QString& art_automatic,
} }
void AlbumCoverLoader::ProcessTasks() { void AlbumCoverLoader::ProcessTasks() {
forever { while (!stop_requested_) {
if (stop_requested_) return;
// Get the next task // Get the next task
Task task; Task task;
{ {

View File

@ -137,8 +137,8 @@ BackgroundThread<InterfaceType>::BackgroundThread(QObject *parent)
template <typename InterfaceType> template <typename InterfaceType>
BackgroundThread<InterfaceType>::~BackgroundThread() { BackgroundThread<InterfaceType>::~BackgroundThread() {
if (isRunning()) { if (isRunning()) {
if (worker_) // Possible race condition here if (boost::shared_ptr<InterfaceType> w = worker_)
worker_->Stop(); w->Stop();
quit(); quit();
if (wait(10000)) if (wait(10000))