#define _hypot hypot
#endif
+#if defined(__GNUG__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-value"
+#endif
+
#include <pybind11/functional.h>
#include <pybind11/pybind11.h> // Must come before our own stuff
#include <pybind11/stl.h>
+#if defined(__GNUG__)
+#pragma GCC diagnostic pop
+#endif
+
#include "src/kernel/context/Context.hpp"
#include <simgrid/Exception.hpp>
#include <simgrid/s4u/Actor.hpp>
},
"Create an actor from a function or an object, see :cpp:func:`simgrid::s4u::Actor::create()`")
.def_property("host", &Actor::get_host, &Actor::migrate, "The host on which this actor is located")
+ .def_property_readonly("name", &Actor::get_cname, "The name of this actor.")
.def_property_readonly("pid", &Actor::get_pid, "The PID (unique identifier) of this actor.")
+ .def_property_readonly("ppid", &Actor::get_ppid,
+ "The PID (unique identifier) of the actor that created this one.")
.def("by_pid", &Actor::by_pid, "Retrieve an actor by its PID")
.def("daemonize", &Actor::daemonize,
"This actor will be automatically terminated when the last non-daemon actor finishes, see :cpp:func:`void "
"simgrid::s4u::Actor::daemonize()`")
+ .def("is_daemon", &Actor::is_daemon,
+ "Returns True if that actor is a daemon and will be terminated automatically when the last non-daemon actor "
+ "terminates.")
.def("join", py::overload_cast<double>(&Actor::join),
"Wait for the actor to finish, see :cpp:func:`void simgrid::s4u::Actor::join(double)`", py::arg("timeout"))
.def("kill", [](ActorPtr act) { act->kill(); }, "Kill that actor")