Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "Revert "actually fix the memleak around smpi's process_data" and "try to...
[simgrid.git] / include / simgrid / s4u / Actor.hpp
index 8f332c8..147f538 100644 (file)
@@ -19,6 +19,7 @@
 #include <xbt/Extendable.hpp>
 #include <xbt/functional.hpp>
 #include <xbt/string.hpp>
+#include <xbt/signal.hpp>
 
 #include <simgrid/chrono.hpp>
 #include <simgrid/s4u/forward.hpp>
@@ -162,6 +163,11 @@ public:
   /** Retrieve a reference to myself */
   static ActorPtr self();
 
+  /** Signal to others that a new actor has been created **/
+  static simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> onCreation;
+  /** Signal indicating that the given actor is about to disappear */
+  static simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> onDestruction;
+
   /** Create an actor using a function
    *
    *  If the actor is restarted, the actor has a fresh copy of the function.