Hello,
I need some help with this Producer Consumer Controller code.
I need to perform Task A on all the records of an input file. Input file may contain millions of records.
I need to be able to run this process at a steady
thread count of say 20 threads.
I wrote three classes - Producer, Consumer and Controller
I do not know how to make the program wait till the producer and consumer completes their task and then exit the VM.
If I set the threadcount less than the number of records in the file, the program exits properly after processing all the records.
If I set threadcount equal to the number of records in file, the program never exits, even though all the records were processed.
Can someone please tell me how to get past this, Thank you.
Regards
Kasi