MgrPyModule *mod;
public:
+ bool running;
+
ServeThread(MgrPyModule *mod_)
: mod(mod_) {}
{
PyGILState_STATE gstate;
gstate = PyGILState_Ensure();
+ running = true;
dout(4) << "Entering thread for " << mod->get_name() << dendl;
mod->serve();
PyGILState_Release(gstate);
+ running = false;
return nullptr;
}
};
dout(10) << __func__ << ": notify_all " << notify_type << dendl;
for (auto& i : modules) {
auto module = i.second.get();
+ if (!serve_threads[i.first]->running)
+ continue;
// Send all python calls down a Finisher to avoid blocking
// C++ code, and avoid any potential lock cycles.
finisher.queue(new FunctionContext([module, notify_type, notify_id](int r){
dout(10) << __func__ << ": notify_all (clog)" << dendl;
for (auto& i : modules) {
auto module = i.second.get();
+ if (!serve_threads[i.first]->running)
+ continue;
// Send all python calls down a Finisher to avoid blocking
// C++ code, and avoid any potential lock cycles.
//