Using fork join_none to span threads in a for loop in parallel, which is executed in forever loop

In reply to juhi_p:

Thank you! I want to understand why is the below statement added? i tried without it and it goes to infinite loop. I am not understanding how this statemnt killed the current thread.

wait(abc!=a);