Skip to content
Snippets Groups Projects
Commit 28593c56 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Use unique lock in trigger

parent 019eabae
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,8 @@ struct Handler : BaseHandler {
void trigger(ARGS ...args) {
bool hadFault = false;
std::string faultMsg;
std::shared_lock<std::shared_mutex> lk(mutex_);
// FIXME: This should be a shared_lock but there is a race condition elsewhere.
std::unique_lock<std::shared_mutex> lk(mutex_);
for (auto i = callbacks_.begin(); i != callbacks_.end(); ) {
bool keep = true;
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment