From 44ca3bef2c3c41aed515d63f5776d562e11ee25e Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Tue, 11 Oct 2016 16:10:25 +0200 Subject: [PATCH] fix(controller): Try to acquire lock for 50ms on module update Allow short bursts since we want to handle all events when starting the modules. --- include/components/controller.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/components/controller.hpp b/include/components/controller.hpp index 45a8923f..945d843d 100644 --- a/include/components/controller.hpp +++ b/include/components/controller.hpp @@ -407,7 +407,7 @@ class controller { } void on_module_update(string module_name) { - if (!m_mutex.try_lock()) + if (!m_mutex.try_lock_for(50ms)) return; std::lock_guard guard(m_mutex, std::adopt_lock);