Changeset 2800 in Sophya for trunk/SophyaPI/PIext/pistdimgapp.cc


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

File:
1 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 ) {
Note: See TracChangeset for help on using the changeset viewer.