I decided to learn threading for a program of mine which seems (I may be wrong) to scream its necessity.
I thought threads were supposed to be executed in parallel in machines having more than one core.
So why am I getting the following output from the following program?
[I left out joining for now...Does that play a role here ?]
The output is instead of my expected jumble of 9s and 8s. Why is it so ?
using namespace std;
void* foo(void* arg);
void* foo(void* arg)