thread synchronisation- Producer keeps on producing but consumer not always consumes
Hello
Well i am implementing G back N ARQ protocol simulation. How to implement tis?
My sender thread will be keep on adding to my common handler class (a class being assesed by both sender and reciever) while my reciever thread check the handler class queue member and check if the sie is more than it will try to grab from there.
Point is both want to assess the same common class so how to maintain synchronisation in between them?
TIA
Re: thread synchronisation- Producer keeps on producing but consumer not always consumes
For an example of a synchronized event queue you may take a look at this:
http://www.codeguru.com/forum/showth...83#post1136383
- petter
Re: thread synchronisation- Producer keeps on producing but consumer not always consumes