Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
allow to set tracing category in STARTING state
authorFred Suter <suterf@ornl.gov>
Tue, 16 May 2023 15:40:38 +0000 (11:40 -0400)
committerFred Suter <suterf@ornl.gov>
Mon, 22 May 2023 12:37:01 +0000 (08:37 -0400)
include/simgrid/s4u/Activity.hpp

index 82a880a..ca01513 100644 (file)
@@ -261,7 +261,8 @@ public:
 
   AnyActivity* set_tracing_category(const std::string& category)
   {
-    xbt_assert(get_state() == State::INITED, "Cannot change the tracing category of an activity after its start");
+    xbt_assert(get_state() == State::INITED || get_state() == State::STARTING,
+               "Cannot change the tracing category of an activity after its start");
     tracing_category_ = category;
     return static_cast<AnyActivity*>(this);
   }