Two Problems Following Program First Problems Main Thread Ends Threads Get Chance Display Q11120785

There are two problems with the following program.

There are two problems with the following program. The first problems that the main thread ends before the other threads get a chance to display their results. After that problem is fixed, the second problem is that we then want the threads to display their results in the order of 0-6. In other words, the output should always be: You are not permitted to change any of the existing code, you may only ADD code to fix the problem. You must use a mutex to fix the synchronization problem Show transcribed image text There are two problems with the following program. The first problems that the main thread ends before the other threads get a chance to display their results. After that problem is fixed, the second problem is that we then want the threads to display their results in the order of 0-6. In other words, the output should always be: You are not permitted to change any of the existing code, you may only ADD code to fix the problem. You must use a mutex to fix the synchronization problem

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *