Changeset 2494 in Sophya for trunk/SophyaPI/PIext/basexecut.cc


Ignore:
Timestamp:
Jan 6, 2004, 7:44:56 PM (22 years ago)
Author:
ansari
Message:

Suite debugging gestion lock entre threads ds piapp - A l'air de

marcher sur OSF1 et Linux ... Reza 06/01/2004

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/basexecut.cc

    r2465 r2494  
    6666  nx = ny = 1;
    6767  nx = atoi(tokens[0].c_str());    ny = atoi(tokens[1].c_str());
    68   if (mImgApp) mImgApp->SetZone(nx, ny);
    69   } 
     68  if (mImgApp) {
     69    mImgApp->LockMutex();  // <ZThread> global event loop synchronisation
     70    mImgApp->SetZone(nx, ny);
     71    mImgApp->UnlockMutex(true);  // <ZThread> global event loop synchronisation
     72  }
     73
    7074else if (kw == "newwin") {
    7175  int nx=1, ny=1;
     
    7882    sy = atoi(tokens[3].c_str());
    7983  }
    80   if (mImgApp) mImgApp->CreateGraphWin(nx, ny, sx, sy);
     84  if (mImgApp) {
     85    mImgApp->LockMutex();   // <ZThread> global event loop synchronisation
     86    mImgApp->CreateGraphWin(nx, ny, sx, sy);
     87    mImgApp->UnlockMutex(true); // <ZThread> global event loop synchronisation
     88  }
    8189
    82 else if (kw == "stacknext") mImgApp->StackWinNext();
     90else if (kw == "stacknext") {
     91  mImgApp->LockMutex();  // <ZThread> global event loop synchronisation
     92  mImgApp->StackWinNext();
     93  mImgApp->UnlockMutex(true);  // <ZThread> global event loop synchronisation
     94}
    8395else if (kw == "graphicatt") {
    8496  if (tokens.size() < 1) { cout << "Usage: graphicatt attributes_list (att=def->defaut)" << endl;  return(0); }
     
    296308// utilise donc des DlFunction  (Reza 20/08/98)  voir commentaire ds .h (pb g++)
    297309  DlUserProcFunction fuf = (DlUserProcFunction)(*it).second;
     310/*DEL----- Plus besoin en multi-thread ? / Reza 06/01/2004
    298311//   On redirige la sortie sur le terminal
    299312  bool red = mImgApp->HasRedirectedStdOutErr();
    300313  mImgApp->RedirectStdOutErr(false);
     314                                    --------DEL  */
    301315#ifdef SANS_EVOLPLANCK
    302316  TRY {
     
    326340  }
    327341#endif
     342/*DEL----- Plus besoin en multi-thread ? / Reza 06/01/2004
    328343  mImgApp->RedirectStdOutErr(red);
     344                                    --------DEL    */
    329345}
    330346
Note: See TracChangeset for help on using the changeset viewer.