C++ Factory using worker threads, mutexes, sleeping, etc.
Consider a plant, where there are 20 part workers whose jobs areto produce four types of parts (A, B, C,
D). Each of them produces four pieces of parts of at most threedifferent types each time, such as
(1,1,2,0), (3,1,0,0), (2,2,0,0), (1,0,1,2), (4,0,0,0) etc., while(1,1,1,1) is not allowed. All possible
combinations will carry the same probability. In your program youhave to randomly generate one
combination. Each part worker will attempt to place the partsgenerated to a buffer area. Therefore,
each combination (a, b, c, d) from a part worker is referred to asa place request.
In addition, there are
PayPal Gateway not configured
PayPal Gateway not configured