Fix IPython history corruption when using launch_repl.

PiperOrigin-RevId: 508064761
Change-Id: I58fa2e4f35b57a1ab68c3172ba5c0d4495e40ced
This commit is contained in:
Saran Tunyasuvunakool
2023-02-08 06:36:52 -08:00
committed by Copybara-Service
parent 48e95817e4
commit 7d8e810ab1
3 changed files with 86 additions and 16 deletions
+4 -1
View File
@@ -88,11 +88,14 @@ PYBIND11_MODULE(_simulate, pymodule) {
.def_readonly("run", &mujoco::Simulate::run,
py::call_guard<py::gil_scoped_release>())
.def_property_readonly(
.def_property(
"exitrequest",
[](mujoco::Simulate& simulate) {
return simulate.exitrequest.load();
},
[](mujoco::Simulate& simulate, bool exitrequest) {
simulate.exitrequest.store(exitrequest);
},
py::call_guard<py::gil_scoped_release>())
.def_property_readonly(