From: Fred Suter Date: Tue, 16 May 2023 15:40:38 +0000 (-0400) Subject: allow to set tracing category in STARTING state X-Git-Tag: v3.34~109^2~13 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4f6f8198545c1c1478a0043cf3f8bfb98942d23a allow to set tracing category in STARTING state --- diff --git a/include/simgrid/s4u/Activity.hpp b/include/simgrid/s4u/Activity.hpp index 82a880a2c1..ca015134fe 100644 --- a/include/simgrid/s4u/Activity.hpp +++ b/include/simgrid/s4u/Activity.hpp @@ -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(this); }