diff --git a/include/ftl/handle.hpp b/include/ftl/handle.hpp index 534d7883ccf2c5c4dc0812c16dae937528a483ef..d59c6476c13385ba3cb6a9d83ddb874df87274af 100644 --- a/include/ftl/handle.hpp +++ b/include/ftl/handle.hpp @@ -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 {