Fork join_none inside for loop

In reply to suman_vip:

I also ran this code on EDA playground and did not see the results you are getting. However, the order the $display statements execute is indeterminate.

There is no “i” in your example. But if you meant you were displaying “j” inside the fork/join_none loops, then j would be 3 since the for loop would terminate before any statements within the fork/join_none starts executing. That’s the point of giving each iteration of the for loop a local copy of k.