From: Yuri Weinstein Date: Wed, 17 May 2023 15:33:39 +0000 (-0700) Subject: Merge pull request #51042 from kotreshhr/wip-59415-reef X-Git-Tag: v18.1.0~103 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b638f330fecedff5acab87640ec5bf2c9a2a2378;p=ceph.git Merge pull request #51042 from kotreshhr/wip-59415-reef reef: mgr: Add one finisher thread per module Reviewed-by: Venky Shankar --- b638f330fecedff5acab87640ec5bf2c9a2a2378 diff --cc src/mgr/PyModuleRegistry.h index 14b8339665a4,c0e951ed7b67..e16b2830d910 --- a/src/mgr/PyModuleRegistry.h +++ b/src/mgr/PyModuleRegistry.h @@@ -221,9 -219,23 +221,19 @@@ public auto get_clients() const { - std::scoped_lock l(lock); - std::vector v; - for (const auto& p : clients) { - v.push_back(p.second); - } - return v; + std::lock_guard l(lock); + return clients; } + bool is_module_active(const std::string &name) { + ceph_assert(active_modules); + return active_modules->module_exists(name); + } + + auto& get_active_module_finisher(const std::string &name) { + ceph_assert(active_modules); + return active_modules->get_module_finisher(name); + } + // <<< (end of ActivePyModules cheeky call-throughs) };