Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
allowed to do that in this state too
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Mon, 20 Dec 2021 20:08:21 +0000 (21:08 +0100)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Mon, 20 Dec 2021 20:08:21 +0000 (21:08 +0100)
src/s4u/s4u_Activity.cpp

index 7ed8264..b5c7478 100644 (file)
@@ -118,7 +118,8 @@ double Activity::get_remaining() const
 
 Activity* Activity::set_remaining(double remains)
 {
-  xbt_assert(state_ == State::INITED, "Cannot change the remaining amount of work once the Activity is started");
+  xbt_assert(state_ == State::INITED || state_ == State::STARTING,
+             "Cannot change the remaining amount of work once the Activity is started");
   remains_ = remains;
   return this;
 }