Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics in examples' comments and description
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 23 Jan 2023 12:33:18 +0000 (13:33 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 23 Jan 2023 15:03:41 +0000 (16:03 +0100)
examples/README.rst
examples/cpp/comm-failure/s4u-comm-failure.cpp
examples/cpp/exec-failure/s4u-exec-failure.cpp

index cc35595..1412c50 100644 (file)
@@ -456,7 +456,7 @@ The ``test_any()`` returns whether at least one activity of the set has complete
 Dealing with network failures
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-This examples shows how to survive to network exceptions that occur when a link is turned off, or when the actor with whom
+This examples shows how to survive to network exceptions that occurs when a link is turned off, or when the actor with whom
 you communicate fails because its host is turned off. In this case, any blocking operation such as ``put``, ``get`` or
 ``wait`` will raise an exception that you can catch and react to. See also :ref:`howto_churn`,
 :ref:`this example <s4u_ex_platform_state_profile>` on how to attach a state profile to hosts and
@@ -615,7 +615,7 @@ There is not much new compared to the above ptask example or the
 Dealing with host failures
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-This examples shows how to survive to host failure exceptions that occur when an host is turned off. The actor do not get notified when the host
+This examples shows how to survive to host failure exceptions that occur when an host is turned off. The actors do not get notified when the host
 on which they run is turned off: they are just terminated in this case, and their ``on_exit()`` callback gets executed. For remote executions on
 failing hosts however, any blocking operation such as ``exec`` or ``wait`` will raise an exception that you can catch and react to. See also
 :ref:`howto_churn`,
index d7fc941..c278fac 100644 (file)
@@ -3,8 +3,8 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-/* This example shows how to react to a failed communication, which occures when a link is turned off.
- *
+/* This example shows how to react to a failed communication, which occurs when a link is turned off,
+ * or when the actor with whom you communicate fails because its host is turned off.
  */
 
 #include <simgrid/s4u.hpp>
index 1dd509a..545b4f5 100644 (file)
@@ -3,16 +3,13 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-/* This example shows how to serialize a set of communications going through a link
+/* This examples shows how to survive to host failure exceptions that occur when an host is turned off.
  *
- * As for the other asynchronous examples, the sender initiates all the messages it wants to send and
- * pack the resulting simgrid::s4u::CommPtr objects in a vector.
- * At the same time, the receiver starts receiving all messages asynchronously. Without serialization,
- * all messages would be received at the same timestamp in the receiver.
+ * The actors do not get notified when the host on which they run is turned off: they are just terminated
+ * in this case, and their ``on_exit()`` callback gets executed.
  *
- * However, as they will be serialized in a link of the platform, the messages arrive 2 by 2.
- *
- * The sender then blocks until all ongoing communication terminate, using simgrid::s4u::Comm::wait_all()
+ * For remote executions on failing hosts however, any blocking operation such as ``exec`` or ``wait`` will
+ * raise an exception that you can catch and react to, as illustrated in this example.
  */
 
 #include <simgrid/s4u.hpp>