X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/96cedde3cdbc0b8ffc3f096a1b65d021b0226f99..da06ff05b3164a8de84cfcfc427384c7791e5647:/examples/s4u/README.rst diff --git a/examples/s4u/README.rst b/examples/s4u/README.rst index 571632bff9..d7f8291f70 100644 --- a/examples/s4u/README.rst +++ b/examples/s4u/README.rst @@ -38,15 +38,31 @@ Starting and Stoping Actors - **Creating actors:** Most actors are started from the deployment XML file, but there is other methods. This example show them all. + `examples/python/actor-create/actor-create_d.xml `_ - |cpp| `examples/s4u/actor-create/s4u-actor-create.cpp `_ - |py| `examples/python/actor-create/actor-create.py `_ - + + - **React to the end of actors:** + You can attach a callback to the end of actors. There is two ways + of doing so, depending of whether you want your callback to be + executed when a specific actor ends (with ```this_actor::on_exit()```) + or whether it should be executed when any actor ends (with + ```Actor::on_destruction()```) + + - |cpp| `examples/s4u/actor-exiting/s4u-actor-exiting.cpp `_ + - **Kill actors:** - Actors can forcefully stop other actors with the - :cpp:func:`void simgrid::s4u::Actor::kill(void)` or the - :cpp:func:`void simgrid::s4u::Actor::kill(aid_t)` methods. - |br| `examples/s4u/actor-kill/s4u-actor-kill.cpp `_ + Actors can forcefully stop other actors. + + - |cpp| `examples/s4u/actor-kill/s4u-actor-kill.cpp `_ + :cpp:func:`void simgrid::s4u::Actor::kill(void)`, + :cpp:func:`void simgrid::s4u::Actor::kill_all()`, + :cpp:func:`simgrid::s4u::this_actor::exit`. + - |py| `examples/python/actor-kill/actor-kill.py `_ + :py:func:`simgrid.Actor.kill`, + :py:func:`simgrid.Actor.kill_all`, + :py:func:`simgrid.this_actor.exit`. - **Controling the actor life cycle from the XML:** You can specify a start time and a kill time in the deployment @@ -265,6 +281,19 @@ Interacting with the Platform |br| `examples/s4u/platform-properties/s4u-platform-properties_d.xml `_ |br| `examples/platforms/prop.xml `_ + - **Specifying state profiles:** shows how to specify when the + resources must be turned off and on again, and how to react to such + failures in your code. + + |br| `examples/platforms/small_platform_with_failure.xml `_ + |br| The state profiles in `examples/platforms/profiles `_ + + - **Specifying speed profiles:** shows how to specify an external + load to resources, variating their peak speed over time. + + |br| `examples/platforms/small_platform_profile.xml `_ + |br| The speed, bandwidth and latency profiles in `examples/platforms/profiles `_ + ================= Energy Simulation =================