Browse Source

Ubuntu 15.04: thread->wait() hangs on Program Exit in GAudioOutput destructor

QGC4.4
Benno Eigenmann 10 years ago
parent
commit
d879a932cc
  1. 6
      src/GAudioOutput.cc

6
src/GAudioOutput.cc

@ -56,16 +56,14 @@ GAudioOutput::GAudioOutput(QObject *parent) : @@ -56,16 +56,14 @@ GAudioOutput::GAudioOutput(QObject *parent) :
worker->moveToThread(thread);
connect(this, &GAudioOutput::textToSpeak, worker, &QGCAudioWorker::say);
connect(this, &GAudioOutput::beepOnce, worker, &QGCAudioWorker::beep);
connect(thread, &QThread::finished, thread, &QObject::deleteLater);
connect(thread, &QThread::finished, worker, &QObject::deleteLater);
thread->start();
}
GAudioOutput::~GAudioOutput()
{
thread->quit();
thread->wait();
delete worker;
delete thread;
}

Loading…
Cancel
Save