lordgamez commented on code in PR #1854:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1854#discussion_r1717149215


##########
extensions/python/PythonScriptEngine.cpp:
##########
@@ -243,4 +243,24 @@ std::vector<core::Relationship> 
PythonScriptEngine::getCustomPythonRelationships
   return relationships;
 }
 
+void PythonScriptEngine::setModuleAttributes(const std::string& 
qualified_module_name) {
+  GlobalInterpreterLock gil;

Review Comment:
   From my experience it seems that every time we are calling the python C API 
we need to be holding the GIL, otherwise one of the python API calls crashes 
the application with a segmentation fault, so in a way it is foolproof, 
although debugging the issue is not always trivial as it usually does not crash 
at call where the GIL was missing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to