1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-18 20:34:39 +01:00

Don't get stuck when exiting Clementine while library is being created/updated

This commit is contained in:
Arnaud Bienner 2012-08-30 00:01:28 +02:00
parent c4ae0209c6
commit 09596e3732
2 changed files with 5 additions and 1 deletions

View File

@ -191,6 +191,10 @@ WorkerPool<HandlerType>::~WorkerPool() {
}
}
}
foreach (ReplyType* reply, message_queue_) {
reply->Abort();
}
}
template <typename HandlerType>

View File

@ -101,7 +101,7 @@ Library::Library(Application* app, QObject *parent)
Library::~Library() {
watcher_->deleteLater();
watcher_thread_->exit();
watcher_thread_->wait();
watcher_thread_->wait(5000 /* five seconds */);
}
void Library::Init() {