1
0
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:
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() {
forever {
if (stop_requested_) return;
while (!stop_requested_) {
// Get the next task
Task task;
{

View File

@ -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))