I was trying to do sample code to understand multithreading in MFC
I have a scenario as mentioned below.
Thread A ->Should Write to a buffer
Thread B ->Should Write to buffer after Thread A completes
Thread C ->Should Write to buffer after Thread A and B completes .
Thread D ->Reads from the buffer and send it to printer driver.
So as mentioned above,three thread is writing to a buffer one by one and one thread is reading from that buffer.
can anyone tell me how to implement this case.