Q. In this I need to disable the fork as soon as the execution of any two threads completed?
module tb;
initial
begin
fork : A
begin:Thread1
$display("Inside Thread 1");
end:Thread1
begin:Thread2
$display("Inside Thread 2");
end:Thread2
begin:Thread3
$display("Inside Thread 3");
end:Thread3
join_none : A
end
endmodule