Esempio n. 1
0
 virtual size_t run( void )
 {
   for(;;)
   {
     CountPtr< JobQueue::Job > job = q->getJob();
     if( size_t(-1) == job->work( q ) ) return 0;
     Thread::yield();
   }
 }
Esempio n. 2
0
void worker( ) {
   for (;;) {
      Request r(myJobQueue.getJob( ));
      // Do something with the job...
   }
}