let's say,
producer produces 5 packets and takes 5 time interval for each packet produced.
consumer consumes 5 packets and takes random time interal betweeen 2 to 6.
assume we have a packet class , a producer class and a consumer class.
inside producer class an array of packet object is declared with size 5 and the method produce to produce the packets.
inside consumer class it is consumed by the method consume, I assume consume meanas some methods or properties inside the packet object is utilized.
what my question is I hear a lot producer consumer questions and I am uncertain about the implementation. what is that "CONSUME" means actually?
it will be better if I can recieve a program.
Wht should I prefer event properties or mailbox or semaphore... I could write this without them..