reset queue when restart
This commit is contained in:
parent
53e11ccbed
commit
457d74bb7a
|
@ -251,6 +251,11 @@ namespace server {
|
||||||
|
|
||||||
void CarlaCommunication::sendWorld(const uint32_t modes,const uint32_t scenes) {
|
void CarlaCommunication::sendWorld(const uint32_t modes,const uint32_t scenes) {
|
||||||
|
|
||||||
|
//ClearThreads
|
||||||
|
_worldThread.clear();
|
||||||
|
_clientThread.clear();
|
||||||
|
_serverThread.clear();
|
||||||
|
|
||||||
World world;
|
World world;
|
||||||
_proto->LoadWorld(world, modes, scenes);
|
_proto->LoadWorld(world, modes, scenes);
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,11 @@ namespace thread {
|
||||||
return _restart;
|
return _restart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear(){
|
||||||
|
_readQueue.clear();
|
||||||
|
_writeQueue.clear();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void workerThread() {
|
void workerThread() {
|
||||||
|
|
|
@ -55,6 +55,10 @@ namespace thread {
|
||||||
_reconnectJob();
|
_reconnectJob();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear(){
|
||||||
|
_queue.clear();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void workerThread() {
|
void workerThread() {
|
||||||
while (!_done){
|
while (!_done){
|
||||||
|
|
|
@ -53,6 +53,10 @@ namespace thread {
|
||||||
_reconnectJob();
|
_reconnectJob();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear(){
|
||||||
|
_queue.clear();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void workerThread() {
|
void workerThread() {
|
||||||
|
|
|
@ -63,6 +63,10 @@ namespace thread {
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear(){
|
||||||
|
_value = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
bool empty() const {
|
bool empty() const {
|
||||||
std::lock_guard<std::mutex> lock(_mutex);
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
//return _queue.empty();
|
//return _queue.empty();
|
||||||
|
|
Loading…
Reference in New Issue