Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
improve doxygen comments in s4u
[simgrid.git] / src / s4u / s4u_Actor.cpp
index 3548aba..c1d7128 100644 (file)
@@ -86,15 +86,6 @@ void Actor::on_exit(std::function<void(int, void*)> fun, void* data)
   simgrid::simix::simcall([this, fun, data] { SIMIX_process_on_exit(pimpl_, fun, data); });
 }
 
-/** @brief Moves the actor to another host
- *
- * If the actor is currently blocked on an execution activity, the activity is also
- * migrated to the new host. If it's blocked on another kind of activity, an error is
- * raised as the mandated code is not written yet. Please report that bug if you need it.
- *
- * Asynchronous activities started by the actor are not migrated automatically, so you have
- * to take care of this yourself (only you knows which ones should be migrated).
- */
 void Actor::migrate(Host* new_host)
 {
   s4u::Actor::on_migration_start(this);
@@ -285,12 +276,12 @@ XBT_PUBLIC void sleep_until(double timeout)
 
 void execute(double flops)
 {
-  get_host()->execute(flops);
+  execute(flops, 1.0 /* priority */);
 }
 
 void execute(double flops, double priority)
 {
-  get_host()->execute(flops, priority);
+  exec_init(flops)->set_priority(priority)->start()->wait();
 }
 
 void parallel_execute(int host_nb, s4u::Host** host_list, double* flops_amount, double* bytes_amount, double timeout)