Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Let's say I have 3 kinds of bakery shops.I wanna have a buffer for each one of them.With that way i can control producing-consuming for each bakery shops. How can I implement it to c language with Pthreads?

Thanks in advance

What I have tried:

Unfortunetly until now i didnt try anything. I am trying to understand multiple buffers.
Posted
Updated 9-Jan-21 7:37am

You may find (just Google for) many pthread code samples about the producer-consumer problem. They could be your starting point.
 
Share this answer
 
at first you must learn and understand the basic of C and multi-threading is an advanced theme. Looks like soome pthread tutorial.
You can imagine it as some persons are in the kitchen and are cooking together. The biggest problem is to explain them how the understand each other and have to wait for each other in some form.
 
Share this answer
 

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