From 9dc772ae5b71da14cef03965005e32e577bc0a46 Mon Sep 17 00:00:00 2001 From: smh Date: Wed, 9 Jun 2004 11:35:40 +0000 Subject: [PATCH] Fix on Bug GEOM6047 Script GEOM_example3.py freeze IAPP (Now, salome.sg.updateObjBrowser(0) freeze the IAPP !!! ) --- src/Event/SALOME_Event.cxx | 78 ++++++--------------------- src/Event/SALOME_Event.hxx | 50 ++++++++--------- src/SALOMEGUI/PyInterp_PyQt.cxx | 2 - src/SALOMEGUI/QAD_Desktop.cxx | 13 +++-- src/SALOMEGUI/QAD_PyEditor.cxx | 1 - src/SALOME_PYQT/SALOME_PYQT_GUI.cxx | 3 +- src/Session/SALOME_Session_Server.cxx | 17 ++++++ src/Session/SALOME_Session_i.cxx | 1 - 8 files changed, 64 insertions(+), 101 deletions(-) diff --git a/src/Event/SALOME_Event.cxx b/src/Event/SALOME_Event.cxx index dfebd7b02..42ca096d4 100644 --- a/src/Event/SALOME_Event.cxx +++ b/src/Event/SALOME_Event.cxx @@ -46,16 +46,11 @@ static int MYDEBUG = 0; * Constructor */ //=========================================================== -SALOME_Event::SALOME_Event(): - myWait( true ), - myAutoRelease( false ) -{ - if(MYDEBUG) MESSAGE( "SALOME_Event::SALOME_Event(): this = "<operator+=( mySemaphore->total() ); - } - } - if(MYDEBUG) MESSAGE( "SALOME_Event::processed() COMPLETED: this = "<initialize(); mapInterp[StudyID] = interp; } // imports Python GUI module and puts it in _module attribute diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index ff9a6cf3c..9fd38593b 100644 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -33,6 +33,7 @@ #include using namespace std; +#include #include #include #include @@ -86,10 +87,26 @@ using namespace std; * - get session state */ +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + +static pthread_t myThread; + +extern bool IsSessionThread(){ + bool aResult = myThread == pthread_self(); + if(MYDEBUG) INFOS("IsSessionThread() - "<::Instance() ; ASSERT(SINGLETON_::IsAlreadyExisting()) ; int orbArgc = 1; diff --git a/src/Session/SALOME_Session_i.cxx b/src/Session/SALOME_Session_i.cxx index 890028127..6d0f0f640 100644 --- a/src/Session/SALOME_Session_i.cxx +++ b/src/Session/SALOME_Session_i.cxx @@ -30,7 +30,6 @@ #include "SALOME_Session_i.hxx" #include "SALOME_NamingService.hxx" -#include "SALOME_Session_QThread.hxx" #include "QAD_Application.h" #include "QAD_Desktop.h" -- 2.39.2