Browse Source

Bug fix: doFile now closes message reader immediately after scan so that the file is not open when CGP resumes processing.

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-fa6ab0af3dfc
master
madscientist 10 years ago
parent
commit
5279129279
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      SNF4CGP/JobPool.cpp
  2. 1
    1
      SNF4CGP/OutputProcessor.cpp

+ 1
- 1
SNF4CGP/JobPool.cpp View File

@@ -123,8 +123,8 @@ void Job::doUNKNOWN() {
void Job::doFILE() {
doInitialRead();
doScan();
doAction();
closeReader();
doAction();
}
RuntimeCheck CheckMessageReaderIsValid("Job::Reader() Check(0 != Reader_)");

+ 1
- 1
SNF4CGP/OutputProcessor.cpp View File

@@ -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);
}

Loading…
Cancel
Save