CollectionWatcher: Use mutex for stop and abort

This commit is contained in:
Jonas Kvinge
2024-08-23 20:22:18 +02:00
parent 2778a55e8e
commit be09011bb7
7 changed files with 102 additions and 49 deletions

View File

@@ -80,7 +80,7 @@ SCollection::SCollection(Application *app, QObject *parent)
SCollection::~SCollection() {
if (watcher_) {
watcher_->Stop();
watcher_->Abort();
watcher_->deleteLater();
}
if (watcher_thread_) {
@@ -159,7 +159,7 @@ void SCollection::IncrementalScan() { watcher_->IncrementalScanAsync(); }
void SCollection::FullScan() { watcher_->FullScanAsync(); }
void SCollection::AbortScan() { watcher_->Stop(); }
void SCollection::StopScan() { watcher_->Stop(); }
void SCollection::Rescan(const SongList &songs) {