These didn't need to keep the GIL to go and do their
pure C++ parts, and by keeping it they could deadlock
while trying to take ActiveMgrModules::lock.
Signed-off-by: John Spray <john.spray@redhat.com>
jf.flush(*_dout);
*_dout << dendl;
+ PyThreadState *tstate = PyEval_SaveThread();
self->py_modules->set_health_checks(self->this_module->get_name(),
std::move(out_checks));
+ PyEval_RestoreThread(tstate);
Py_RETURN_NONE;
}
// We call down into PyModules even though we have a MgrPyModule
// reference here, because MgrPyModule's fields are protected
// by PyModules' lock.
+ PyThreadState *tstate = PyEval_SaveThread();
self->py_modules->set_uri(self->this_module->get_name(), svc_str);
+ PyEval_RestoreThread(tstate);
Py_RETURN_NONE;
}