Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a comment on why we need such a callback
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 24 Feb 2023 00:19:09 +0000 (01:19 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 24 Feb 2023 00:19:09 +0000 (01:19 +0100)
src/s4u/s4u_Exec.cpp

index 9e76966..c0fcdc0 100644 (file)
@@ -31,6 +31,7 @@ void Exec::reset() const
 ExecPtr Exec::init()
 {
   auto pimpl = kernel::activity::ExecImplPtr(new kernel::activity::ExecImpl());
+  /* Allow parallel execs to fail if any of their hosts fail */
   unsigned int cb_id = Host::on_state_change.connect([pimpl](s4u::Host const& h) {
     if (not h.is_on() && pimpl->get_state() == kernel::activity::State::RUNNING &&
         std::find(pimpl->get_hosts().begin(), pimpl->get_hosts().end(), &h) != pimpl->get_hosts().end()) {