Confusion in fork join ... disable fork

In reply to Sailaja:

Hi Dave,

Here in the below code if i get timer_flag as ‘0’ even before the completion of thread named label, I am trying to disable that process. As per my analysis it should disable that particular iteration and again it has to wait for timer_flag to be 1 to continue, and it has to wait for time run_duration before making expired bit 1 from the last valid time_flag that it receives .But this logic is calculating run_duration from the first valid timer_flag.(Consider if re-setting timer_flag to 0 for two times at 0ns, 5ns and 10ns and run_duration value is 50ns,then the expired bit should get assert at 60ns but its happening at 50ns itself,which is not my requirement.) How does it happens even after disabling label thread?

Could you please provide some clarity on this.

Code::

fork 
  forever
  begin :label //{
      wait(timer_flag==1);
      #(run_duration);
      expired=1;
      timer_flag=0;
  end //}

  forever
  begin //{
  @(timer_flag);
     if(timer_flag==0)
     begin
     ovm_report_info(get_type_name,$psprintf("Disabling label thread at time %.6t", $realtime));
     disable label;
     end
   end //}
 join //}

Thanks