In reply to dave_59:
task my_task()
fork : first_fork
task1;
task2;
join_any : first_fork
fork
begin : sec_fork_guard
fork : sec_fork
task3;
task4;
join_any : sec_fork
disable fork; // only disable inside sec_fork_guard block
end : sec_fork_guard
join
endtask : my_task
Hello Dave,
May I have one more question here. As for the first solution above, ‘disable fork’ means to disable the fork/join without label outside of begin/end instead of the ‘fork: sec_fork’. Am I correct?
Thanks,