X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7b13238bee59da3e8d3621560943d14d18ceeea4..4b0fa756ae6e58a74c374a519389ecb9e8b6a4d9:/include/simgrid/s4u/Actor.hpp diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index 302d6e5bc2..b72b576f1c 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -10,7 +10,6 @@ #include #include -#include #include #include @@ -26,7 +25,7 @@ namespace s4u { /** An actor is an independent stream of execution in your distributed application. * - * \beginrst + * \rst * It is located on a (simulated) :cpp:class:`host `, but can interact * with the whole simulated platform. * @@ -50,7 +49,7 @@ class XBT_PUBLIC Actor : public xbt::Extendable { kernel::actor::ActorImpl* const pimpl_; #endif - explicit Actor(smx_actor_t pimpl) : pimpl_(pimpl) {} + explicit Actor(kernel::actor::ActorImpl* pimpl) : pimpl_(pimpl) {} public: #ifndef DOXYGEN @@ -63,7 +62,7 @@ public: friend XBT_PUBLIC void intrusive_ptr_release(const Actor* actor); #endif /** Retrieve the amount of references on that object. Useful to debug the automatic refcounting */ - int get_refcount(); + int get_refcount() const; // ***** Actor creation ***** /** Retrieve a reference to myself */ @@ -105,8 +104,9 @@ public: static ActorPtr create(const std::string& name, s4u::Host* host, const std::function& code); /** Create an actor, but don't start it yet. * - * This is usefull to set some properties or extension before actually starting it */ + * This is useful to set some properties or extension before actually starting it */ static ActorPtr init(const std::string& name, s4u::Host* host); + ActorPtr set_stacksize(unsigned stacksize); /** Start a previously initialized actor */ ActorPtr start(const std::function& code); @@ -156,7 +156,7 @@ public: void resume(); /** Returns true if the actor is suspended. */ - bool is_suspended(); + bool is_suspended() const; /** If set to true, the actor will automatically restart when its host reboots */ void set_auto_restart(bool autorestart); @@ -177,7 +177,7 @@ public: /** Sets the time at which that actor should be killed */ void set_kill_time(double time); /** Retrieves the time at which that actor will be killed (or -1 if not set) */ - double get_kill_time(); + double get_kill_time() const; /** @brief Moves the actor to another host * @@ -366,7 +366,7 @@ XBT_PUBLIC void exit(); * blocking functions forbidden in this setting, but also modifications to the global state. * * The parameter of on_exit's callbacks denotes whether or not the actor's execution failed. - * It will be set to true if the actor was killed or failed because of an exception, + * It will be set to true if the actor was killed or failed because of an exception or if the simulation deadlocked, * while it will remain to false if the actor terminated gracefully. */