Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Comm::test() is ready to be merged with Activity::test().
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 21 Apr 2021 21:22:58 +0000 (23:22 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 22 Apr 2021 08:07:32 +0000 (10:07 +0200)
src/s4u/s4u_Comm.cpp

index 039dbc8..5ffb612 100644 (file)
@@ -261,12 +261,12 @@ Comm* Comm::cancel()
   return this;
 }
 
-bool Comm::test()
+bool Comm::test() // TODO: merge with Activity::test, once modernized
 {
   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)