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:
parent
088d298c7d
commit
d5762bbbd7
@ -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;
|
||||||
{
|
{
|
||||||
|
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user