Is fork join and fork join_any with wait fork perform the same operation?

In reply to perumallatarun:

In reply to SaphEr:
but the final thing in both the test cases is same, it will wait for all the threads to complete.

Yes, they are same. When you use “fork…join_any” and “wait_fork”, the program will wait at “wait_fork” statement until all threads in “fork…join_any” are completed.