In reply to bmorris:
Oh. My previous statement is wrong. Actually B is a scoreboard.
In B run_phase:
super.run_phase();
Forever begin
if()
freeToken();
end
A is a sequence , and here what going on is:
task body();
…
while() begin
if(getToken())
break;
end
endtask