From: apo Date: Fri, 30 Nov 2007 07:08:29 +0000 (+0000) Subject: The probelem of the previous bug was not in bad BOOST implementation of signals libra... X-Git-Tag: mergeto_BR_Dev_For_4_0_07-Dec-07~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4054eece6a445fb048a984b70a72ae3cb8ddb8e5;p=modules%2Fvisu.git The probelem of the previous bug was not in bad BOOST implementation of signals library (it seems that it really disconnect its observers, when it is destroyed), but, as usual, in not thread safety of our own code --- diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index 043668b8..dd973c56 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -205,16 +205,31 @@ void VISU::ColoredPrs3d_i ::UpdateFromResult(Result_i* theResult) { - try{ - if(theResult == GetCResult()){ - DoSetInput(false, false); - UpdateActors(); + struct TEvent: public SALOME_Event + { + VISU::ColoredPrs3d_i* myColoredPrs3d; + + TEvent(VISU::ColoredPrs3d_i* theColoredPrs3d): + myColoredPrs3d(theColoredPrs3d) + {} + + virtual + void + Execute() + { + try{ + myColoredPrs3d->DoSetInput(false, false); + myColoredPrs3d->UpdateActors(); + }catch(std::exception& exc){ + INFOS("Follow exception was occured :\n"<ConnectObserver(this, myResultConnection); + GetCResult()->ConnectObserver(this, myResultConnection); myPreviousEntity = myEntity; myPreviousFieldName = myFieldName;