} else {
simcall->timeout_cb_ = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall, execs, count]() {
for (size_t i = 0; i < count; i++) {
- // Remove the first occurence of simcall:
+ // Remove the first occurrence of simcall:
auto* exec = execs[i];
auto j = boost::range::find(exec->simcalls_, simcall);
if (j != exec->simcalls_.end())
}
XBT_DEBUG("Create execute synchro %p: %s", this, get_cname());
- ExecImpl::on_creation(*this);
return this;
}
state_ = SIMIX_DONE;
}
- on_completion(*this);
-
clean_action();
if (timeout_detector_) {
timeout_detector_ = nullptr;
}
- /* If there are simcalls associated with the synchro, then answer them */
- if (not simcalls_.empty())
- finish();
+ /* Answer all simcalls associated with the synchro */
+ finish();
}
void ExecImpl::finish()
size_t count = simcall_execution_waitany_for__get__count(simcall);
for (size_t i = 0; i < count; i++) {
- // Remove the first occurence of simcall:
+ // Remove the first occurrence of simcall:
auto* exec = execs[i];
auto j = boost::range::find(exec->simcalls_, simcall);
if (j != exec->simcalls_.end())
/*************
* Callbacks *
*************/
-xbt::signal<void(ExecImpl&)> ExecImpl::on_creation;
-xbt::signal<void(ExecImpl const&)> ExecImpl::on_completion;
xbt::signal<void(ExecImpl const&, s4u::Host*)> ExecImpl::on_migration;
} // namespace activity