Wait for signal value in a task with timeout

In reply to dave_59:

In reply to shaygueta:
Just fork the timeout delay.

task automatic timeout(ref logic signal,input logic value,input time timeout_value);
bit timed_out;
fork begin
fork
begin
#timeout_value;
`uvm_error(....
timed_out = '1;
end
join_none
wait(signal === value || timed_out);
disable fork;
end join
endtask

Note the enclosing fork/join is needed to prevent the disable fork from killing other child threads that may have been spawned before calling this task.

HI Dave :
1 can I use disable {name of fork} instead of the guard fork/join here ? i.e
wait(signal === value || timed_out);
disable < name of fork process>; // assume there is name of fork/join_none
2. Do you recommend always use a guard fork/join when there is disable fork ? for example
in run_phase(uvm_phase phase);

Thanks