]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/ActivePyModules.cc: use wrappers for acquiring/releasing GIL
authorKefu Chai <kchai@redhat.com>
Thu, 24 Dec 2020 07:27:41 +0000 (15:27 +0800)
committerSage Weil <sage@newdream.net>
Mon, 22 Feb 2021 18:24:26 +0000 (12:24 -0600)
commitdda003fa1bd4a6db3cc1d54888f9abc62fdb59ff
tree2a06c9e862680b4e86c54f91eb6748bd589345e2
parent5c377c88571ca6879380ef44461761d99a4045b3
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.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9c652fb305a3e3d1b4a752bac9bd8a85d15c7de9)
src/mgr/ActivePyModules.cc
src/mgr/ActivePyModules.h
src/mgr/ClusterState.h