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
@@ -60,7 +60,7 @@ bool TwitchMessageBuilder::isIgnored() const
auto app = getApp();
// TODO(pajlada): Do we need to check if the phrase is valid first?
for (const auto &phrase : app->ignores->phrases.getVector())
for (const auto &phrase : app->ignores->phrases)
{
if (phrase.isBlock() && phrase.isMatch(this->originalMessage_))
{
@@ -221,7 +221,7 @@ MessagePtr TwitchMessageBuilder::build()
}
}
auto app = getApp();
const auto &phrases = app->ignores->phrases.getVector();
const auto &phrases = app->ignores->phrases;
auto removeEmotesInRange =
[](int pos, int len,
std::vector<std::tuple<int, EmotePtr, EmoteName>>