Wait statement inside a driver

Update - Actually in my code the wait statement did not work. I had to use the while statement to drive as intended.


while (vif.driver_cb.trigger == 0) begin
  @(vif.driver_cb);
end