| Author |
Producer-Consumer (BlockingQueue)
|
Stefan Gerber
Ranch Hand
Joined: Mar 08, 2008
Posts: 33
|
|
Hello,
I have a Producer that puts some job on a blockingQueue. The Consumer (WorkerThread) takes this jobs and process it. I have a second list (Vector) where i store all OpenJobs. now the producer should wait till all jobs are finished (The openJobs list is empty). Is there something like a blockingQueue that blocks the producer Thread till the last elemet is removed from the openjobs list? Or is there a design pattern that covers this topic?
thanks
|
 |
 |
|
|
subject: Producer-Consumer (BlockingQueue)
|
|
|