- .def_property_readonly(
- "remaining",
- [](simgrid::s4u::ExecPtr self) {
- py::gil_scoped_release gil_guard;
- return self->get_remaining();
- },
- "Amount of flops that remain to be computed until completion (read-only property).")
- .def_property_readonly(
- "remaining_ratio",
- [](simgrid::s4u::ExecPtr self) {
- py::gil_scoped_release gil_guard;
- return self->get_remaining_ratio();
- },
- "Amount of work remaining until completion from 0 (completely done) to 1 (nothing done "
- "yet) (read-only property).")
+ .def_property_readonly("remaining", &simgrid::s4u::Exec::get_remaining, py::call_guard<py::gil_scoped_release>(),
+ "Amount of flops that remain to be computed until completion (read-only property).")
+ .def_property_readonly("remaining_ratio", &simgrid::s4u::Exec::get_remaining_ratio,
+ py::call_guard<py::gil_scoped_release>(),
+ "Amount of work remaining until completion from 0 (completely done) to 1 (nothing done "
+ "yet) (read-only property).")