From: Arnaud Giersch Date: Wed, 12 Feb 2020 22:16:37 +0000 (+0100) Subject: Allow to call test() on canceled activities. X-Git-Tag: v3.26~971 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/01c23e1330e93416df34eb6c4ee55022b4cec64c Allow to call test() on canceled activities. --- diff --git a/src/s4u/s4u_Activity.cpp b/src/s4u/s4u_Activity.cpp index 1560c50178..f1a24ae50d 100644 --- a/src/s4u/s4u_Activity.cpp +++ b/src/s4u/s4u_Activity.cpp @@ -25,9 +25,9 @@ void Activity::wait_until(double time_limit) bool Activity::test() { xbt_assert(state_ == State::INITED || state_ == State::STARTED || state_ == State::STARTING || - state_ == State::FINISHED); + state_ == State::CANCELED || state_ == State::FINISHED); - if (state_ == State::FINISHED) + if (state_ == State::CANCELED || state_ == State::FINISHED) return true; if (state_ == State::INITED || state_ == State::STARTING)