mirror of
https://github.com/ceph/ceph
synced 2025-02-24 03:27:10 +00:00
Merge pull request #38099 from tchaikov/wip-mgr-python3.9
mgr/PyModuleRegistry: do not call PyEval_InitThreads() on python3.9 Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
commit
d5e73a9e93
@ -60,13 +60,13 @@ void PyModuleRegistry::init()
|
||||
}
|
||||
PyImport_AppendInittab("ceph_module", PyModule::init_ceph_module);
|
||||
Py_InitializeEx(0);
|
||||
|
||||
#if PY_VERSION_HEX < 0x03090000
|
||||
// Let CPython know that we will be calling it back from other
|
||||
// threads in future.
|
||||
if (! PyEval_ThreadsInitialized()) {
|
||||
PyEval_InitThreads();
|
||||
}
|
||||
|
||||
#endif
|
||||
// Drop the GIL and remember the main thread state (current
|
||||
// thread state becomes NULL)
|
||||
pMainThreadState = PyEval_SaveThread();
|
||||
|
Loading…
Reference in New Issue
Block a user