}
pthread_mutex_init( &_MutexPythonWait , NULL ) ;
+ _MutexPythonLocked = false ;
_ExecNumber = 0 ;
_GraphExecutingNumber = 0 ;
_PyInitModule = false ;
return ;
}
+void GraphExecutor::FiniteStateMachine::PyInitModule( bool aPyInitModule ) {
+ _PyInitModule = aPyInitModule ;
+}
+
bool GraphExecutor::FiniteStateMachine::PyInitModule() {
bool InitedModule = _PyInitModule ;
_PyInitModule = true ;
perror( "GraphExecutor::FiniteStateMachine::PyLock" ) ;
exit( 0 ) ;
}
+ _MutexPythonLocked = true ;
// cout << pthread_self() << " GraphExecutor::FiniteStateMachine::PyLocked " << &_MutexPythonWait << endl ;
}
perror( "GraphExecutor::FiniteStateMachine::PyUnLock" ) ;
exit( 0 ) ;
}
+ _MutexPythonLocked = false ;
// cout << pthread_self() << " GraphExecutor::FiniteStateMachine::PyUnLocked " << &_MutexPythonWait << endl ;
}
+void GraphExecutor::FiniteStateMachine::PyLockReset() {
+ if ( _MutexPythonLocked ) {
+ PyUnLock() ;
+ }
+}
+
PyObject * GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncName ) {
PyObject * RetVal = NULL ;
[ GraphExecutor::NumberOfEvents ] ;
pthread_mutex_t _MutexPythonWait ;
+ bool _MutexPythonLocked ;
map< string , PyObject * > _MapOfPyFunctions ;
bool _PyInitModule ;
int _ExecNumber ;
int ExecNumber() ;
void Executed() ;
+ void PyInitModule(bool) ;
bool PyInitModule() ;
void PyLock() ;
void PyUnLock() ;
+ void PyLockReset() ;
bool PyFunction( const char * aPyFuncName , PyObject * aPyFunction ) ;
PyObject * PyFunction( const char * aPyFuncName ) ;