Changeset 2494 in Sophya
- Timestamp:
- Jan 6, 2004, 7:44:56 PM (22 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/basexecut.cc
r2465 r2494 66 66 nx = ny = 1; 67 67 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 } 70 74 else if (kw == "newwin") { 71 75 int nx=1, ny=1; … … 78 82 sy = atoi(tokens[3].c_str()); 79 83 } 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 } 81 89 } 82 else if (kw == "stacknext") mImgApp->StackWinNext(); 90 else if (kw == "stacknext") { 91 mImgApp->LockMutex(); // <ZThread> global event loop synchronisation 92 mImgApp->StackWinNext(); 93 mImgApp->UnlockMutex(true); // <ZThread> global event loop synchronisation 94 } 83 95 else if (kw == "graphicatt") { 84 96 if (tokens.size() < 1) { cout << "Usage: graphicatt attributes_list (att=def->defaut)" << endl; return(0); } … … 296 308 // utilise donc des DlFunction (Reza 20/08/98) voir commentaire ds .h (pb g++) 297 309 DlUserProcFunction fuf = (DlUserProcFunction)(*it).second; 310 /*DEL----- Plus besoin en multi-thread ? / Reza 06/01/2004 298 311 // On redirige la sortie sur le terminal 299 312 bool red = mImgApp->HasRedirectedStdOutErr(); 300 313 mImgApp->RedirectStdOutErr(false); 314 --------DEL */ 301 315 #ifdef SANS_EVOLPLANCK 302 316 TRY { … … 326 340 } 327 341 #endif 342 /*DEL----- Plus besoin en multi-thread ? / Reza 06/01/2004 328 343 mImgApp->RedirectStdOutErr(red); 344 --------DEL */ 329 345 } 330 346 -
trunk/SophyaPI/PIext/piacmd.cc
r2490 r2494 218 218 void PIACmd::run() 219 219 { 220 cout << " DBG-PIACmd::run() -- DEBUT " << endl;221 220 while (!fg_thrstop) { 222 221 mutx_inps.lock(); -
trunk/SophyaPI/PIext/pistdimgapp.cc
r2492 r2494 408 408 while (!_fgstop) { 409 409 usleep(2000); 410 _app->getMutex().broadcast(); 410 _app->LockMutex(); 411 bool fgb = false; 412 if (_app->CheckPendingEvents() != 0) fgb = true; 413 _app->UnlockMutex(fgb); 411 414 } 412 415 } … … 415 418 bool _fgstop; 416 419 }; 420 421 int PIStdImgApp::CheckPendingEvents() 422 { 423 return XtAppPending(*_appctx); 424 } 425 417 426 /* --Methode-- */ 418 427 void PIStdImgApp::Run() … … 421 430 int szx, szy, szf; 422 431 XtAppContext * appctx = PIXtAppCtx(szx, szy, szf); 432 _appctx = appctx; // Pour CheckPendingEvents() 423 433 // Pour appeler FinishCreate() des objets dans la fenetre principale 424 434 if (mStop) { // C'est la premiere fois -
trunk/SophyaPI/PIext/pistdimgapp.h
r2492 r2494 60 60 inline void LockMutex() { thr_glsyn.lock(); } 61 61 inline void UnlockMutex(bool fgbr=false) 62 { thr_glsyn.broadcast(); thr_glsyn.unlock(); }62 { if (fgbr) thr_glsyn.broadcast(); thr_glsyn.unlock(); } 63 63 inline bool isGlSyncLocked() { return fg_glsynlock; } 64 int CheckPendingEvents(); 64 65 65 66 // Methodes d'Affichage generique … … 240 241 ZMutex thr_glsyn; 241 242 bool fg_glsynlock; // true: thr_glsyn locke pour traitement evts 243 XtAppContext * _appctx; // Pour CheckPendingEvents() $CHECK$ A supprimer si possible ... 242 244 }; 243 245 -
trunk/SophyaPI/PIext/servnobjm.cc
r2491 r2494 441 441 return; 442 442 } 443 nt->Show();444 nt->Print(0,10);443 //DBG nt->Show(); 444 //DBG nt->Print(0,10); 445 445 PINTuple3D* pin = new PINTuple3D(nt, true); 446 446 pin->SelectXYZ(ntn[0], ntn[1], ntn[2]);
Note:
See TracChangeset
for help on using the changeset viewer.