From: Martin Quinson Date: Thu, 23 Nov 2023 12:08:47 +0000 (+0100) Subject: Properly register the waiter in wait_any_for(), so that it gets handled on suspend... X-Git-Tag: v3.35~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8be89720f55b4ceeb2877531ae1602cc7ed947d6 Properly register the waiter in wait_any_for(), so that it gets handled on suspend, failure or anything We all love fixing obscure bugs on release days. That's how we fail our release processes. --- diff --git a/src/kernel/activity/ActivityImpl.cpp b/src/kernel/activity/ActivityImpl.cpp index 015ca2064b..f1a9859319 100644 --- a/src/kernel/activity/ActivityImpl.cpp +++ b/src/kernel/activity/ActivityImpl.cpp @@ -146,7 +146,7 @@ void ActivityImpl::wait_any_for(actor::ActorImpl* issuer, const std::vectorget_value(); idx != -1) { auto* act = activities.at(idx); - act->simcalls_.push_back(&issuer->simcall_); + act->register_simcall(&issuer->simcall_); observer->set_result(idx); act->set_state(State::DONE); act->finish(); @@ -168,7 +168,7 @@ void ActivityImpl::wait_any_for(actor::ActorImpl* issuer, const std::vectorsimcalls_.push_back(&issuer->simcall_); + act->register_simcall(&issuer->simcall_); /* see if the synchro is already finished */ if (act->get_state() != State::WAITING && act->get_state() != State::RUNNING) { act->finish();