Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Allow to call test() on canceled activities.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 12 Feb 2020 22:16:37 +0000 (23:16 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 12 Feb 2020 23:07:35 +0000 (00:07 +0100)
src/s4u/s4u_Activity.cpp

index 1560c50..f1a24ae 100644 (file)
@@ -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)