]> SALOME platform Git repositories - tools/adao_interface.git/commitdiff
Salome HOME
Rationalize the GIL management of AdaoExchangeLayer class
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 25 Sep 2019 08:35:04 +0000 (10:35 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 25 Sep 2019 08:35:04 +0000 (10:35 +0200)
AdaoExchangeLayer.cxx
README.txt

index a478bf0d77c9edf152ff23b4d6b94de5c5915d56..09e396f750aa8a9d1a88002be1d4386040e49c26 100644 (file)
@@ -280,6 +280,7 @@ private:
 
 void AdaoExchangeLayer::loadTemplate(AdaoModel::MainModel *model)
 {
+  AutoGIL agil;
   const char DECORATOR_FUNC[]="def DecoratorAdao(cppFunc):\n"
       "    def evaluator( xserie ):\n"
       "        import numpy as np\n"
index 3a07fdea88f5fa1169075615a7528deab378c1c2..a7ac090d37a69c86240018367aa05cf11759998b 100644 (file)
@@ -2,4 +2,14 @@ _internal->_py_call_back : Py function intercepting multifunc call
 
 _internal->_decorator_func : Decoration func around _internal->_py_call_back to deal with returned values of _internal->_py_call_back
 
+################# user GIL management in AdaoExchangeLayer
 
+class AdaoExchangeLayer has been developped to be launched from any thread.
+
+AdaoExchangeLayer manage the GIL (using AutoGIL) in its implementation.
+
+Consequence the AdaoExchangeLayer instance should NOT be surrounded by GIL protection.
+
+############## user GIL management in AdaoModel::MainModel
+
+The custom MainModel overloading should be GIL protected by the user.