]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/PyModuleRegistry: do not call PyEval_InitThreads() on python3.9 38099/head
authorKefu Chai <kchai@redhat.com>
Mon, 16 Nov 2020 07:33:42 +0000 (15:33 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 16 Nov 2020 07:42:37 +0000 (15:42 +0800)
commit28985555f8557c297e15d68ff0ed5bd2868adc5e
treec19aeff8c64ff26ef5427fb9f9fae9aef9d99381
parent07cba31a03a3a311940a5338944f11ad2c87b641
mgr/PyModuleRegistry: do not call PyEval_InitThreads() on python3.9

PyEval_InitThreads() and PyEval_ThreadsInitialized() are deprecated
since python3.9, and GIL is initialized by Py_Initialize() in python3.9.
so do not call them unless we are using python < 3.9.

see https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mgr/PyModuleRegistry.cc