Changeset 3366 in Sophya for trunk/SophyaPI/PIext/piacmd.h


Ignore:
Timestamp:
Oct 30, 2007, 1:57:40 PM (18 years ago)
Author:
ansari
Message:

Tentative pour regler le probleme de blocage de piapp suite a affichage de la fefenetre de gestion d'objets.

1/ Protection dans NamedObjMgr() pour eviter deadlock de mutex (ds NamedObjMgr::UpdateObjMgrWindow() en particulier)
2/ Introduction de la classe SOpExObj (fichier piacmd.h .cc) pour execution d'operations sur objets, initiees depuis la boucle d'evts, dans un thread separe.

Reza , 30/10/2007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/piacmd.h

    r2999 r3366  
    100100
    101101
     102//
     103// ---------------------------------------------------------------------
     104// Classe d'execution d'operations simples, comme affichage (display)
     105// print , del ... issues en particulier de la boucle d'evts
     106// (PIStdImgApp, ObjMgrWind , ...)
     107// ---------------------------------------------------------------------
     108
     109class SOpExObj : public ZThread  {
     110public:
     111                        SOpExObj(PIStdImgApp* app);
     112  virtual               ~SOpExObj();
     113
     114  // Thread execution  <ZThread>
     115  virtual void          run();
     116  void                  AddOpe(string const & line);
     117  void                  StopThread();
     118
     119protected:
     120  PIStdImgApp* mImgApp;
     121  queue<string> inputlines;
     122  ZMutex mutx_inps;
     123  bool fg_thrstop;
     124  bool fg_threxe;
     125};
     126
     127
     128
    102129
    103130#endif
Note: See TracChangeset for help on using the changeset viewer.