Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
handle (badly) the timeout exception in wait_for()
[simgrid.git] / src / s4u / s4u_Activity.cpp
index 1560c501785ea8f02edec98608a50c3373337d4b..f1a24ae50d898ece2be473e51e5f788370732d50 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)