mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 12:30:40 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into smaller-collision-margins
This commit is contained in:
commit
3f8f5fd82e
6 changed files with 229 additions and 224 deletions
|
@ -232,9 +232,11 @@ void AssignmentClient::readPendingDatagrams() {
|
|||
|
||||
connect(workerThread, &QThread::started, _currentAssignment.data(), &ThreadedAssignment::run);
|
||||
|
||||
// once the ThreadedAssignment says it is finished - we ask it to deleteLater
|
||||
// Once the ThreadedAssignment says it is finished - we ask it to deleteLater
|
||||
// This is a queued connection so that it is put into the event loop to be processed by the worker
|
||||
// thread when it is ready.
|
||||
connect(_currentAssignment.data(), &ThreadedAssignment::finished, _currentAssignment.data(),
|
||||
&ThreadedAssignment::deleteLater);
|
||||
&ThreadedAssignment::deleteLater, Qt::QueuedConnection);
|
||||
|
||||
// once it is deleted, we quit the worker thread
|
||||
connect(_currentAssignment.data(), &ThreadedAssignment::destroyed, workerThread, &QThread::quit);
|
||||
|
|
|
@ -29,6 +29,8 @@ class AudioMixer : public ThreadedAssignment {
|
|||
Q_OBJECT
|
||||
public:
|
||||
AudioMixer(const QByteArray& packet);
|
||||
|
||||
void deleteLater() { qDebug() << "DELETE LATER CALLED?"; QObject::deleteLater(); }
|
||||
public slots:
|
||||
/// threaded run of assignment
|
||||
void run();
|
||||
|
|
|
@ -53,6 +53,7 @@ void ThreadedAssignment::setFinished(bool isFinished) {
|
|||
// if we have a datagram processing thread, quit it and wait on it to make sure that
|
||||
// the node socket is back on the same thread as the NodeList
|
||||
|
||||
|
||||
if (_datagramProcessingThread) {
|
||||
// tell the datagram processing thread to quit and wait until it is done,
|
||||
// then return the node socket to the NodeList
|
||||
|
|
Loading…
Reference in a new issue