Changeset 2494 in Sophya for trunk/SophyaPI/PIext/pistdimgapp.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/pistdimgapp.cc

    r2492 r2494  
    408408    while (!_fgstop) {
    409409      usleep(2000);
    410       _app->getMutex().broadcast();
     410      _app->LockMutex();
     411      bool fgb = false;
     412      if (_app->CheckPendingEvents() != 0)  fgb = true;
     413      _app->UnlockMutex(fgb);
    411414    }
    412415  }
     
    415418  bool _fgstop;
    416419};
     420
     421int PIStdImgApp::CheckPendingEvents()
     422{
     423  return XtAppPending(*_appctx);
     424}
     425
    417426/* --Methode-- */
    418427void PIStdImgApp::Run()
     
    421430int szx, szy, szf;
    422431XtAppContext * appctx = PIXtAppCtx(szx, szy, szf);
     432_appctx = appctx;   // Pour CheckPendingEvents()
    423433// Pour appeler FinishCreate() des objets dans la fenetre principale
    424434if (mStop) { // C'est la premiere fois
Note: See TracChangeset for help on using the changeset viewer.