Changeset 2800 in Sophya


Ignore:
Timestamp:
Jun 8, 2005, 5:44:20 PM (20 years ago)
Author:
ansari
Message:

Ajout methode CkEvt_LockMutex() pour gestion gestion lock avec verification des pending_events - Reza 8 Juin 2005

Location:
trunk/SophyaPI/PIext
Files:
2 edited

Legend:

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

    r2778 r2800  
    425425}
    426426
     427void PIStdImgApp::CkEvt_LockMutex()
     428{
     429  for(int i=0; i<5; i++) {   // On tente 5 fois de vider le buffer d'evenements
     430    LockMutex();
     431    int nev = CheckPendingEvents();
     432    bool fgbr = (nev > 0) ? true : false;
     433    UnlockMutex(fgbr);
     434    if (nev < 1) break;
     435  }
     436  LockMutex();
     437}
     438
    427439/* --Methode-- */
    428440void PIStdImgApp::Run()
     
    465477      }
    466478      nevtproc++;
    467       if (nevtproc >= 200)  break;
     479      if (nevtproc >= 300)  break;
    468480    }
    469481    catch ( PThrowable & exc ) {
  • trunk/SophyaPI/PIext/pistdimgapp.h

    r2651 r2800  
    6363     inline bool       isGlSyncLocked() { return fg_glsynlock; }
    6464     int               CheckPendingEvents();
     65     void              CkEvt_LockMutex(); // On fait le lock apres verification de traitement des evenements
    6566
    6667  // Methodes d'Affichage generique
Note: See TracChangeset for help on using the changeset viewer.