Click here to Skip to main content
14,769,975 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi

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.

Thanks
Abhi
Posted

In addition to Carlo's answer: are you sure you want to have that many threads ? If the processing is sequential, I don't really see a reason why you want to split that up into that many threads. Why not having only one thread doing all of that ?
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900