Fixes: http://tracker.ceph.com/issues/19258
Signed-off-by: Kefu Chai <kchai@redhat.com>
// First stop the server so that we're not taking any more incoming requests
server.shutdown();
+ // after the messenger is stopped, signal modules to shutdown via finisher
+ py_modules.shutdown();
+
// Then stop the finisher to ensure its enqueued contexts aren't going
// to touch references to the things we're about to tear down
finisher.wait_for_empty();
}
modules.clear();
+ PyGILState_Ensure();
Py_Finalize();
}