Skip to content

Commit

Permalink
Releasing GIL when waiting for future
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSchneider42 committed Feb 28, 2025
1 parent c8339ad commit 26876b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1038,8 +1038,8 @@ PYBIND11_MODULE(_franky, m) {
return future.wait_for(std::chrono::duration<double>(timeout.value())) == std::future_status::ready;
future.wait();
return true;
}, "timeout"_a = std::nullopt)
.def("get", &std::shared_future<bool>::get);
}, "timeout"_a = std::nullopt, py::call_guard<py::gil_scoped_release>())
.def("get", &std::shared_future<bool>::get, py::call_guard<py::gil_scoped_release>());

py::register_exception<franka::Exception>(m, "Exception");
py::register_exception<franka::CommandException>(m, "CommandException");
Expand Down

0 comments on commit 26876b3

Please sign in to comment.