Question: 1. Modify the thread function to report the thread creation sequence (that is, Hello Thread 0, Hello Thread 1, Hello Thread 2, and so on).

 1. Modify the thread function to report the thread creation sequence

1. Modify the thread function to report the thread creation sequence (that is, Hello Thread 0, Hello Thread 1, Hello Thread 2, and so on).

Hint: Use the CreateThread() loop variable to give each thread a unique number.

2. Build and execute your program.

In what order do the threads execute?

Do the results look correct?

Why or why not?

If modify compiler option to /MP build with multiple processes, then how execution order changes?

3. The execution order to threads is unpredictable? T/F?

#include "stdafx h #include windows.h #include

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!