/** @brief Simulation Agent */
class XBT_PUBLIC Actor : public simgrid::xbt::Extendable<Actor> {
-#ifndef DOXYGEN
- friend Exec;
- friend Mailbox;
+ friend simgrid::s4u::Exec;
+ friend simgrid::s4u::Mailbox;
friend simgrid::kernel::actor::ActorImpl;
friend simgrid::kernel::activity::MailboxImpl;
-#endif
+
kernel::actor::ActorImpl* pimpl_ = nullptr;
explicit Actor(smx_actor_t pimpl) : pimpl_(pimpl) {}
static simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> on_migration_start;
/** Signal to others that an actor is has been migrated to another host **/
static simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> on_migration_end;
- /** Signal indicating that the given actor is about to disappear */
+ /** Signal indicating that an actor is about to disappear.
+ * This signal is fired for any dying actor, which is mostly useful when
+ * designing plugins and extensions. If you want to register to the
+ * termination of a given actor, use this_actor::on_exit() instead.*/
static simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> on_destruction;
/** Create an actor from a std::function<void()>
*/
void kill();
+ /** Kill an actor from its ID */
static void kill(aid_t pid);
/** Retrieves the actor that have the given PID (or nullptr if not existing) */