Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add the python binding to Actor::is_daemon
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 2 Nov 2019 09:37:40 +0000 (10:37 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 2 Nov 2019 09:42:12 +0000 (10:42 +0100)
src/bindings/python/simgrid_python.cpp

index 4b70a2d..347c4b2 100644 (file)
@@ -257,6 +257,9 @@ PYBIND11_MODULE(simgrid, m)
       .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")