Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int CCouchWorker::Run()
- {
- for ( ; ; )
- {
- CouchJobInfo_t *pJob = NULL;
- // wait for a job
- GJobMgr()->GetPendingJob( &pJob );
- if ( pJob == NULL )
- {
- // shutdown signal
- break;
- }
- if ( !GJobMgr()->RunJob( pJob ) )
- {
- continue;
- }
- // notify completion
- // this adds the job to the completed queue
- GJobMgr()->FinishJob( pJob );
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement