Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add suspend/resume to S4U
[simgrid.git] / include / simgrid / s4u / Actor.hpp
index 016799a..9e34530 100644 (file)
@@ -212,6 +212,12 @@ public:
   /** Retrieves the PPID of that actor */
   int ppid();
 
+  /** Suspend an actor by suspending the task on which it was waiting for the completion. */
+  void suspend();
+
+  /** Resume a suspended process by resuming the task on which it was waiting for the completion. */
+  void resume();
+
   /** If set to true, the actor will automatically restart when its host reboots */
   void setAutoRestart(bool autorestart);
   /** Sets the time at which that actor should be killed */
@@ -302,6 +308,13 @@ namespace this_actor {
   /** @brief Returns the name of the host on which the process is running. */
   XBT_PUBLIC(Host*) host();
 
+  /** @brief Suspend the actor. */
+  XBT_PUBLIC(void) suspend();
+
+  /** @brief Resume the actor. */
+  XBT_PUBLIC(void) resume();
+
+  /** @brief Migrate the actor to a new host. */
   XBT_PUBLIC(void) migrate(Host* new_host);
 };