- "Add a callback called when each operation ends.")
- .def_property_readonly("name", &Operation::get_name, "The name of this operation (read-only).")
- .def_property_readonly("count", &Operation::get_count, "The execution count of this operation (read-only).")
- .def_property_readonly("successors", &Operation::get_successors, "The successors of this operation (read-only).")
- .def_property("amount", &Operation::get_amount, &Operation::set_amount,
- "The amount of work to do for this operation.")
- .def("enqueue_execs", py::overload_cast<int>(&Operation::enqueue_execs), py::call_guard<py::gil_scoped_release>(),
- py::arg("n"), "Enqueue executions for this operation.")
- .def("add_successor", py::overload_cast<OperationPtr>(&Operation::add_successor),
- py::call_guard<py::gil_scoped_release>(), py::arg("op"), "Add a successor to this operation.")
- .def("remove_successor", py::overload_cast<OperationPtr>(&Operation::remove_successor),
- py::call_guard<py::gil_scoped_release>(), py::arg("op"), "Remove a successor of this operation.")
- .def("remove_all_successors", &Operation::remove_all_successors, py::call_guard<py::gil_scoped_release>(),
- "Remove all successors of this operation.")
- .def("on_this_start", py::overload_cast<const std::function<void(Operation*)>&>(&Operation::on_this_start),
- py::arg("func"), "Add a callback called when this operation starts.")
- .def("on_this_end", py::overload_cast<const std::function<void(Operation*)>&>(&Operation::on_this_end),
- py::arg("func"), "Add a callback called when this operation ends.")
+ "Add a callback called when each task ends.")
+ .def_property_readonly("name", &Task::get_name, "The name of this task (read-only).")
+ .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<int>(&Task::enqueue_execs), py::call_guard<py::gil_scoped_release>(),
+ py::arg("n"), "Enqueue executions for this task.")
+ .def("add_successor", py::overload_cast<TaskPtr>(&Task::add_successor), py::call_guard<py::gil_scoped_release>(),
+ py::arg("op"), "Add a successor to this task.")
+ .def("remove_successor", py::overload_cast<TaskPtr>(&Task::remove_successor),
+ py::call_guard<py::gil_scoped_release>(), py::arg("op"), "Remove a successor of this task.")
+ .def("remove_all_successors", &Task::remove_all_successors, py::call_guard<py::gil_scoped_release>(),
+ "Remove all successors of this task.")
+ .def("on_this_start", py::overload_cast<const std::function<void(Task*)>&>(&Task::on_this_start), py::arg("func"),
+ "Add a callback called when this task starts.")
+ .def("on_this_end", py::overload_cast<const std::function<void(Task*)>&>(&Task::on_this_end), py::arg("func"),
+ "Add a callback called when this task ends.")