X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f35b1984dec11869ee6a0117366ae5e7b3b4985f..9abea5188b7bc67c822270a2cb300c777d3b2727:/src/kernel/resource/DiskImpl.cpp?ds=sidebyside diff --git a/src/kernel/resource/DiskImpl.cpp b/src/kernel/resource/DiskImpl.cpp index a231432488..20c23ac077 100644 --- a/src/kernel/resource/DiskImpl.cpp +++ b/src/kernel/resource/DiskImpl.cpp @@ -71,16 +71,7 @@ void DiskImpl::turn_off() Resource::turn_off(); s4u::Disk::on_onoff(piface_); piface_.on_this_onoff(piface_); - - const kernel::lmm::Element* elem = nullptr; - double now = EngineImpl::get_clock(); - while (const auto* var = get_constraint()->get_variable(&elem)) { - Action* action = var->get_id(); - if (action->get_state() == Action::State::INITED || action->get_state() == Action::State::STARTED) { - action->set_finish_time(now); - action->set_state(Action::State::FAILED); - } - } + cancel_actions(); } }