mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Seriously. DONT DEADLOCK
This commit is contained in:
parent
b871556d4f
commit
5e73d820e2
@ -76,6 +76,7 @@ namespace ace {
|
|||||||
|
|
||||||
bool controller::reset(const arguments &_args, std::string & result) {
|
bool controller::reset(const arguments &_args, std::string & result) {
|
||||||
_ready = false;
|
_ready = false;
|
||||||
|
|
||||||
vehicles.clear();
|
vehicles.clear();
|
||||||
|
|
||||||
if (!ace::model_collection::get().ready()) {
|
if (!ace::model_collection::get().ready()) {
|
||||||
@ -84,7 +85,6 @@ namespace ace {
|
|||||||
|
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock_results(_results_lock);
|
std::lock_guard<std::mutex> lock_results(_results_lock);
|
||||||
//std::lock_guard<std::mutex> lock_messages(_messages_lock);
|
|
||||||
|
|
||||||
while (!_results.empty()) {
|
while (!_results.empty()) {
|
||||||
_results.pop();
|
_results.pop();
|
||||||
@ -94,6 +94,7 @@ namespace ace {
|
|||||||
_messages.pop();
|
_messages.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_ready = true;
|
_ready = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user