For loop inside fork join_none

A fork/join inside a for loop executes serially. Use a wait fork; statement after the loop.

Hi @dave_59, why is this code printing the output 0,1,2 . There is no blocking statement to kick off the fork join_none…

Section 9.3.2 Parallel blocks

In all cases, processes spawned by a fork-join block shall not start executing until the parent process is blocked or terminates.

Exactly, by that time it comes out of the for loop, the simulation ends. So curious, what kicks of the write to get displayed?

Simulation ends when there is nothing scheduled left to do, or a call to $finish/$fatal

Yes, but then what triggers the fork join_none to execute in this case since the parent process is not blocked or terminated yet?