Can some one explain why i values 0,1,2,3,4 at time t=0 when i am using fork join thread, and i value is 5 always when i am using the fork join_none?

module fork_t;
  
  int i;
  initial begin
     for(i=0; i<5; i++ )begin
        fork
           $display($time,"i value = %0d",i);
        join
       
     end
  end  
  
endmodule :fork_t

when using fork join thread

KERNEL: ASDB file was created in location /home/runner/dataset.asdb
# KERNEL:                    0i value = 0
# KERNEL:                    0i value = 1
# KERNEL:                    0i value = 2
# KERNEL:                    0i value = 3
# KERNEL:                    0i value = 4
**When using fork join_none thread**
 KERNEL:                    0i value = 5
# KERNEL:                    0i value = 5
# KERNEL:                    0i value = 5
# KERNEL:                    0i value = 5
# KERNEL:                    0i value = 5

Hi Dave,
Thanks for your reply , I understand the threads working with fork join_none. But I want to know why i values are 0,1,2,3,4 at t=0 when fork join is used . can you pls explain why all values are prints at time t=0. Is there any relation this with System Verilog Event regions.

This has nothing to do with event regions. Everything here executes in the same active region.

A fork/join with a single statement inside it behaves almost identical to a begin/end inside it. The next statement after the join/end does not start executing until after the statement inside finishes.