Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s/NULL/nullptr/ [ci-skip]
[simgrid.git] / src / bindings / python / simgrid_python.cpp
index 78f34a2..db71ba4 100644 (file)
@@ -120,6 +120,8 @@ PYBIND11_MODULE(simgrid, m)
            py::arg("priority") = 1)
       .def("exec_init", py::overload_cast<double>(&simgrid::s4u::this_actor::exec_init),
            py::call_guard<py::gil_scoped_release>())
+      .def("exec_async", py::overload_cast<double>(&simgrid::s4u::this_actor::exec_async),
+           py::call_guard<py::gil_scoped_release>())
       .def("get_host", &simgrid::s4u::this_actor::get_host, "Retrieves host on which the current actor is located")
       .def("set_host", &simgrid::s4u::this_actor::set_host, py::call_guard<py::gil_scoped_release>(),
            "Moves the current actor to another host.", py::arg("dest"))
@@ -722,7 +724,7 @@ PYBIND11_MODULE(simgrid, m)
                              "Retrieve the mailbox on which this comm acts.")
       .def_property_readonly("sender", &Comm::get_sender,
                              py::call_guard<py::gil_scoped_release>())
-      .def_property_readonly("state_str", [](Comm* self){ return std::string(self->get_state_str()); },
+      .def_property_readonly("state_str", [](const Comm* self){ return std::string(self->get_state_str()); },
                              py::call_guard<py::gil_scoped_release>(),
                              "Retrieve the Comm state as string")
       .def_property_readonly("remaining",  &Comm::get_remaining,