Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[S4U API] Expose the isDaemon() function to the API
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Sun, 28 Jan 2018 15:11:45 +0000 (16:11 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Mon, 5 Feb 2018 15:50:43 +0000 (16:50 +0100)
include/simgrid/s4u/Actor.hpp
src/s4u/s4u_actor.cpp

index 147f538..2a77e8e 100644 (file)
@@ -204,6 +204,9 @@ public:
   /** This actor will be automatically terminated when the last non-daemon actor finishes **/
   void daemonize();
 
+  /** Returns whether or not this actor has been daemonized or not **/
+  bool isDaemon();
+
   /** Retrieves the name of that actor as a C++ string */
   const simgrid::xbt::string& getName() const;
   /** Retrieves the name of that actor as a C string */
index a81f54a..57a78fe 100644 (file)
@@ -111,6 +111,11 @@ void Actor::daemonize()
   simgrid::simix::kernelImmediate([this]() { pimpl_->daemonize(); });
 }
 
+bool Actor::isDaemon()
+{
+  return this->pimpl_->isDaemon();
+}
+
 const simgrid::xbt::string& Actor::getName() const
 {
   return this->pimpl_->getName();