X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/db546ad7ab17753b178196b28d89fb9c69b08291..5089a0a98b27f5eeee62321dff4f025f1648f025:/include/simgrid/s4u/Actor.hpp diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index 6bd687de22..ca1183eed2 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -28,7 +28,7 @@ namespace s4u { * You can think of an actor as a process in your distributed application, or as a thread in a multithreaded program. * This is the only component in SimGrid that actually does something on its own, executing its own code. * A resource will not get used if you don't schedule activities on them. This is the code of Actors that create and - * schedule these activities. Please refer to the :ref:`examples ` for more information. + * schedule these activities. **Please refer to the** :ref:`examples ` **for more information.** * * This API is strongly inspired from the C++11 threads. * The `documentation of this standard `_ @@ -74,10 +74,13 @@ public: static xbt::signal on_sleep; /** Signal to others that an actor wakes up for a sleep **/ static xbt::signal on_wake_up; - /** Signal to others that an actor is going to migrated to another host**/ - static xbt::signal on_migration_start; /** Signal to others that an actor is has been migrated to another host **/ - static xbt::signal on_migration_end; + static xbt::signal on_host_change; +#ifndef DOXYGEN + static xbt::signal on_migration_start; // XBT_ATTRIB_DEPRECATED_v329 + static xbt::signal on_migration_end; // XBT_ATTRIB_DEPRECATED_v329 +#endif + /** Signal indicating that an actor terminated its code. * The actor may continue to exist if it is still referenced in the simulation, but it's not active anymore. * If you want to free extra data when the actor's destructor is called, use Actor::on_destruction. @@ -138,10 +141,10 @@ public: /** Retrieves the actor ID of that actor's creator */ aid_t get_ppid() const; - /** Suspend an actor, that is blocked until resume()ed by another actor */ + /** Suspend an actor, that is blocked until resumeed by another actor */ void suspend(); - /** Resume an actor that was previously suspend()ed */ + /** Resume an actor that was previously suspended */ void resume(); /** Returns true if the actor is suspended. */ @@ -177,7 +180,10 @@ public: * 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 migrate(Host * new_host); + void set_host(Host* new_host); +#ifndef DOXYGEN + XBT_ATTRIB_DEPRECATED_v329("Please use set_host() instead") void migrate(Host* new_host) { set_host(new_host); } +#endif /** Ask the actor to die. * @@ -360,7 +366,10 @@ XBT_PUBLIC void exit(); XBT_PUBLIC void on_exit(const std::function& fun); /** @brief Migrate the current actor to a new host. */ -XBT_PUBLIC void migrate(Host* new_host); +XBT_PUBLIC void set_host(Host* new_host); +#ifndef DOXYGEN +XBT_ATTRIB_DEPRECATED_v329("Please use set_host() instead") XBT_PUBLIC void migrate(Host* new_host); +#endif /** @} */ }