*/
Actor* set_auto_restart(bool autorestart = true);
/** Returns the number of reboots that this actor did. Before the first reboot, this function returns 0. */
- int get_restart_count();
+ int get_restart_count() const;
/** Add a function to the list of "on_exit" functions for the current actor. The on_exit functions are the functions
* executed when your actor is killed. You should use them to free the data used by your actor.
#else
xbt_die("MC_is_active() is not supposed to return true in non-MC settings");
#endif
- return;
+ THROW_IMPOSSIBLE; // main_loop never returns
}
if (MC_record_replay_is_active()) {
class XBT_PUBLIC ActorImpl : public xbt::PropertyHolder, public ActorRestartingTrait {
s4u::Host* host_ = nullptr; /* the host on which the actor is running */
+ xbt::string name_;
aid_t pid_ = 0;
aid_t ppid_ = -1;
bool daemon_ = false; /* Daemon actors are automatically killed when the last non-daemon leaves */
friend activity::MailboxImpl;
public:
- xbt::string name_;
ActorImpl(xbt::string name, s4u::Host* host);
ActorImpl(const ActorImpl&) = delete;
ActorImpl& operator=(const ActorImpl&) = delete;
});
return this;
}
-int Actor::get_restart_count()
+int Actor::get_restart_count() const
{
return pimpl_->get_restart_count();
}