Working of "wait fork" construct in system verilog

In reply to kuki2002:

Simulation normally ends when the current time slot event queue is empty, and there is nothing scheduled in any other future time slot. Exception are an explicit call to $finish or the implicit call to $finish caused by the program block.