X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/74c678b8644aa28d345490294709922d4c489bf5..12ef73b3c1b6ef7bb9f2cf8031edf5e99e6c27a1:/src/bindings/python/simgrid_python.cpp diff --git a/src/bindings/python/simgrid_python.cpp b/src/bindings/python/simgrid_python.cpp index 52f5ca6adb..f71d652224 100644 --- a/src/bindings/python/simgrid_python.cpp +++ b/src/bindings/python/simgrid_python.cpp @@ -933,11 +933,11 @@ PYBIND11_MODULE(simgrid, m) }, "Add a callback called when each task starts.") .def_static( - "on_end_cb", + "on_completion_cb", [](py::object cb) { cb.inc_ref(); // keep alive after return const py::gil_scoped_release gil_release; - Task::on_end_cb([cb_p = cb.ptr()](Task* op) { + Task::on_completion_cb([cb_p = cb.ptr()](Task* op) { const py::gil_scoped_acquire py_context; // need a new context for callback py::reinterpret_borrow(cb_p)(op); }); @@ -947,8 +947,8 @@ PYBIND11_MODULE(simgrid, m) .def_property_readonly("count", &Task::get_count, "The execution count of this task (read-only).") .def_property_readonly("successors", &Task::get_successors, "The successors of this task (read-only).") .def_property("amount", &Task::get_amount, &Task::set_amount, "The amount of work to do for this task.") - .def("enqueue_execs", py::overload_cast(&Task::enqueue_execs), py::call_guard(), - py::arg("n"), "Enqueue executions for this task.") + .def("enqueue_firings", py::overload_cast(&Task::enqueue_firings), py::call_guard(), + py::arg("n"), "Enqueue firings for this task.") .def("add_successor", py::overload_cast(&Task::add_successor), py::call_guard(), py::arg("op"), "Add a successor to this task.") .def("remove_successor", py::overload_cast(&Task::remove_successor), @@ -957,7 +957,7 @@ PYBIND11_MODULE(simgrid, m) "Remove all successors of this task.") .def("on_this_start_cb", py::overload_cast&>(&Task::on_this_start_cb), py::arg("func"), "Add a callback called when this task starts.") - .def("on_this_end_cb", py::overload_cast&>(&Task::on_this_end_cb), + .def("on_this_completion_cb", py::overload_cast&>(&Task::on_this_completion_cb), py::arg("func"), "Add a callback called when this task ends.") .def( "__repr__", [](const TaskPtr op) { return "Task(" + op->get_name() + ")"; },