Cleanup: Clarified code in output processor to avoid confusion about the (J = CompletedJobs.take()) assignment while waiting for a 0. git-svn-id: https://svn.microneil.com/svn/SNF4CGP/trunk@55 59e8e3e7-56fa-483b-b4b4-fa6ab0af3dfcmaster
@@ -123,8 +123,8 @@ void Job::doUNKNOWN() { | |||
void Job::doFILE() { | |||
doInitialRead(); | |||
doScan(); | |||
doAction(); | |||
closeReader(); | |||
doAction(); | |||
} | |||
RuntimeCheck CheckMessageReaderIsValid("Job::Reader() Check(0 != Reader_)"); |
@@ -62,7 +62,7 @@ void OutputProcessor::handleJob(Job& J) { | |||
void OutputProcessor::myTask() { // This is how we do it. | |||
Job* J = 0; // Pull Job pointers from the queue. | |||
CurrentThreadState(WaitingForJobs); | |||
while(J = CompletedJobs.take()) { // Process every job until we get | |||
while(0 != (J = CompletedJobs.take())) { // Process every job until we get | |||
handleJob(*J); // a 0 pointer. Then we're done. | |||
CurrentThreadState(WaitingForJobs); | |||
} |