What is the easiest way to test multi-threading in C++?

Viewed 96

I have a .cpp file which executes a test. I have compiled it into a bin. It works correctly.

I have been asked to test running this test in parallel on two cores of my processor in parallel.

How can I most easily and effectively do this?

Can I just run ./Test1 0 && ./Test1 1 from my Linux terminal?

How can I make the parameters 0 and 1 in the above refer to the core which the test should execute on?

Thanks

0 Answers
Related