std::set<Activity*>* Activity::vetoed_activities_ = nullptr;
+void Activity::destroy()
+{
+ /* First Remove all dependencies */
+ while (not dependencies_.empty())
+ (*(dependencies_.begin()))->remove_successor(this);
+ while (not successors_.empty())
+ this->remove_successor(successors_.front());
+
+ cancel();
+}
+
void Activity::wait_until(double time_limit)
{
double now = Engine::get_clock();
if (pimpl_)
pimpl_->cancel();
});
- release_dependencies();
complete(State::CANCELED);
return this;
}
std::string base = simgrid::xbt::Path(filename).get_base_name();
XBT_ERROR("The DOT described in %s is not a DAG. It contains a cycle.", base.c_str());
for (const auto& a : dag)
- a->cancel();
+ a->destroy();
dag.clear();
}