|
|
|
|
|
|
|
|
void OutputProcessor::myTask() { // This is how we do it.
|
|
|
void OutputProcessor::myTask() { // This is how we do it.
|
|
|
Job* J = 0; // Pull Job pointers from the queue.
|
|
|
Job* J = 0; // Pull Job pointers from the queue.
|
|
|
CurrentThreadState(WaitingForJobs);
|
|
|
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.
|
|
|
handleJob(*J); // a 0 pointer. Then we're done.
|
|
|
CurrentThreadState(WaitingForJobs);
|
|
|
CurrentThreadState(WaitingForJobs);
|
|
|
}
|
|
|
}
|