File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
lldb/source/Plugins/ScriptInterpreter/Python Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -152,12 +152,14 @@ struct InitializePythonRAII {
152152
153153private:
154154 void InitializeThreadsPrivate () {
155- // Since Python 3.7 `Py_Initialize` calls `PyEval_InitThreads` inside itself,
156- // so there is no way to determine whether the embedded interpreter
157- // was already initialized by some external code. `PyEval_ThreadsInitialized`
158- // would always return `true` and `PyGILState_Ensure/Release` flow would be
159- // executed instead of unlocking GIL with `PyEval_SaveThread`. When
160- // an another thread calls `PyGILState_Ensure` it would get stuck in deadlock.
155+ // Since Python 3.7 `Py_Initialize` calls `PyEval_InitThreads` inside
156+ // itself, so there is no way to determine whether the embedded interpreter
157+ // was already initialized by some external code.
158+ // `PyEval_ThreadsInitialized` would always return `true` and
159+ // `PyGILState_Ensure/Release` flow would be executed instead of unlocking
160+ // GIL with `PyEval_SaveThread`. When an another thread calls
161+ // `PyGILState_Ensure` it would get stuck in deadlock.
162+
161163 // The only case we should go further and acquire the GIL: it is unlocked.
162164 if (PyGILState_Check ())
163165 return ;
You can’t perform that action at this time.
0 commit comments