- /** If set to true, the actor will automatically restart when its host reboots */
- void set_auto_restart(bool autorestart);
+ /** If set to true, the actor will automatically restart when its host reboots.
+ *
+ * Some elements of the actor are remembered over reboots: name, host, properties, the on_exit functions, whether it
+ * is daemonized and whether it should automatically restart when its host reboots. Note that the state after reboot
+ * is the one when set_auto_restart() is called.
+ *
+ * If you daemonize your actor after marking it auto_restart, then the new actor after rebooot will not be a daemon.
+ *
+ * The on_exit functions are the one defined when the actor dies, not the ones given when it was marked auto_restart
+ * (sorry for the inconsistency -- speak to us if it's too hard to bear).
+ */
+ 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() const;