What is a good method to use with multithreading to simulate this?
- by user1504257
I am writing a program in c++ in visual studio to be able to handle a line at a park. I have all of my customers in a line at the park and I want to be able to service them using multithreading with openmp.
When I put the pragma and such in, I have multiple threads servicing the same customer at the same time for each and every customer I create, not what I want.
I want for example, if I had two threads and four customers, that thread one to do customer one while thread 2 does customer 2. Then I would like thread 1 to do customer 3 and thread 2 customer 4 at the same time. I don't know if its possible or if there is a better way, but I need to use openmp. Thanks for your input.