]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/ActivePyModules.cc: use wrappers for acquiring/releasing GIL 40047/head
authorKefu Chai <kchai@redhat.com>
Thu, 24 Dec 2020 07:27:41 +0000 (15:27 +0800)
committerPonnuvel Palaniyappan <ponnuvel.palaniyappan@canonical.com>
Fri, 12 Mar 2021 19:20:18 +0000 (19:20 +0000)
commit2467896cf288063f4ee55495f54c2e58a314f6c1
tree626e63914f9015fec5247a98e68368ef0b415462
parent3f35f5ba448dd2b610fe0e5f7fb546dd8e942750
mgr/ActivePyModules.cc: use wrappers for acquiring/releasing GIL

this change is a follow-up of
0601b31a53a455f0b67c981460d198cb3a97f3de, for couple reasons

- document the guideline for locking when working with python GIL
- add primitives to extract the patterns for acquiring/releasing
  GIL. so they can be reused.

Fixes: https://tracker.ceph.com/issues/39264
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9c652fb305a3e3d1b4a752bac9bd8a85d15c7de9)

 Conflicts:
src/mgr/ActivePyModules.cc
src/mgr/DaemonState.cc
 - convert std::pair to DaemonKey::type-name in a few places
 - Removed "mds_metadata" which doesn't exist in latest Nautilus
src/mgr/ActivePyModules.cc
src/mgr/ActivePyModules.h
src/mgr/ClusterState.h
src/mgr/DaemonState.cc