Ejemplo n.º 1
0
// background thread
void datacloud::pager(int background)
   {
   // cycle until stop is requested
   while (!SHOULDSTOP[background])
      if (!loadpendingtile(background)) break; // stop if no further tile is pending

   ISRUNNING[background]=FALSE;
   }
Ejemplo n.º 2
0
// background thread
void datacloud::pager(int background)
   {
   double time;

   // load all pending tiles
   while (!SHOULDSTOP[background])
      if (!loadpendingtile(background)) break;

   // cycle until time runs out
   if (START_CALLBACK!=NULL)
      {
      time=gettime();
      while (!SHOULDSTOP[background] && gettime()-time<CONFIGURE_KEEPALIVE)
         if (!loadpendingtile(background)) waitfor(CONFIGURE_TIMESLICE); // time runs out
         else time=gettime(); // keep thread alive
      }

   ISRUNNING[background]=FALSE;
   }