Killing a fork join_none present in a for loop

In reply to srbeeram:

It would really help to show the actual code you tried to use. In your original post, you said the disable fork_name gave you a compilation error, then you said “it worked” in your followup post without showing what you actually did.

The disable forks you show will not work because: In place 1, there are no child threads of the begin/end block thread inside the fork/join. In place 2, each statement block within the fork/join block creates a child thread and the fork/join_none block becomes a child of that thread, but the disable fork statement is outside the fork/join block and all the child threads that it created are done. disable fork only kills the direct children threads, not the grandchildren.

What you probably want is

fork : fork_block
  begin: begin_block
   fork
      task1;
   join_none
 
   for (;;) begin : for_loop
      fork
         task2;
      join_none
   end : for_loop
 
  fork
     task3;
  join_none

  @reset_event disable fork;
  end : begin_block
join : join_block

You will have to explain further about what you meant about reset needing to be applied second time, or is the reset_event here the second time already?