mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 11:17:38 +02:00
CR
This commit is contained in:
parent
0f7093bed7
commit
b55d8f750f
1 changed files with 5 additions and 4 deletions
|
@ -1222,14 +1222,15 @@ void OctreeServer::aboutToFinish() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shut down all the send threads
|
// Shut down all the send threads
|
||||||
for (auto it = _sendThreads.begin(); it != _sendThreads.end(); ++it) {
|
for (auto& it : _sendThreads) {
|
||||||
auto& sendThread = *it->second;
|
auto& sendThread = *it.second;
|
||||||
sendThread.disconnect(this); // Disconnect so that removeSendThread doesn't get called later
|
sendThread.disconnect(this); // Disconnect so that removeSendThread doesn't get called later
|
||||||
sendThread.setIsShuttingDown();
|
sendThread.setIsShuttingDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait on all send threads to be done before continuing
|
// Clear will destruct all the unique_ptr to OctreeSendThreads which will call the GenericThread's dtor
|
||||||
_sendThreads.clear();
|
// which waits on the thread to be done before returning
|
||||||
|
_sendThreads.clear(); // Cleans up all the send threads.
|
||||||
|
|
||||||
if (_persistThread) {
|
if (_persistThread) {
|
||||||
_persistThread->aboutToFinish();
|
_persistThread->aboutToFinish();
|
||||||
|
|
Loading…
Reference in a new issue