lock SignalVector with shared_lock to allow reading on other threads

This commit is contained in:
fourtf
2019-07-31 22:29:07 +02:00
parent 4e4c7d4c0b
commit fff979b3c0
12 changed files with 120 additions and 35 deletions
@@ -174,7 +174,7 @@ void CommandController::initialize(Settings &, Paths &paths)
auto addFirstMatchToMap = [this](auto args) {
this->commandsMap_.remove(args.item.name);
for (const Command &cmd : this->items_.getVector())
for (const Command &cmd : this->items_)
{
if (cmd.name == args.item.name)
{
@@ -185,7 +185,7 @@ void CommandController::initialize(Settings &, Paths &paths)
int maxSpaces = 0;
for (const Command &cmd : this->items_.getVector())
for (const Command &cmd : this->items_)
{
auto localMaxSpaces = cmd.name.count(' ');
if (localMaxSpaces > maxSpaces)