[ekiga] Actor: Fixed possible thread-safety problems.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Actor: Fixed possible thread-safety problems.
- Date: Thu, 12 Nov 2015 18:40:15 +0000 (UTC)
commit d6a7707f38438fea1d6efcb0efceb4f383d23f41
Author: Damien Sandras <dsandras seconix com>
Date: Tue Nov 10 13:07:07 2015 +0100
Actor: Fixed possible thread-safety problems.
We make sure signals are emitted in the main thread to avoid problems
with non thread-safe implementations.
lib/engine/action/actor.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/lib/engine/action/actor.cpp b/lib/engine/action/actor.cpp
index 0e317f4..c38861f 100644
--- a/lib/engine/action/actor.cpp
+++ b/lib/engine/action/actor.cpp
@@ -35,6 +35,7 @@
*/
#include "actor.h"
+#include "runtime.h"
using namespace Ekiga;
@@ -49,7 +50,7 @@ Actor::add_action (ActionPtr action)
conns.add (action->enabled.connect (boost::bind (boost::ref (action_enabled), action->get_name ())));
conns.add (action->disabled.connect (boost::bind (boost::ref (action_disabled), action->get_name ())));
- action_added (action->get_name ());
+ Ekiga::Runtime::run_in_main (boost::bind (boost::ref(action_added), action->get_name ()));
}
@@ -60,7 +61,7 @@ Actor::remove_action (const std::string & name)
if (!a)
return false;
- action_removed (name);
+ Ekiga::Runtime::run_in_main (boost::bind (boost::ref(action_removed), name));
actions.remove (a);
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]