In reply to pawan:
fork
thread1();
thread2();
join_none
for(int i=0;i<32;i++)
fork
int j = i;
thread3(j);
join_none
In reply to pawan:
fork
thread1();
thread2();
join_none
for(int i=0;i<32;i++)
fork
int j = i;
thread3(j);
join_none