Selaa lähdekoodia

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 11 vuotta sitten
vanhempi
commit
5279129279
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1
    1
      SNF4CGP/JobPool.cpp
  2. 1
    1
      SNF4CGP/OutputProcessor.cpp

+ 1
- 1
SNF4CGP/JobPool.cpp Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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…
Peruuta
Tallenna