Documentation for method wait

Documentation for method wait, assembled from the following types:

class Supply

From Supply

(Supply) method wait

method wait(Supply:D:)

Waits until the supply is done (in which case it returns True) or quit (in which case it will throw the exception that was passed to quit).

my $s = Supplier.new;
start {
  sleep 1;
  say "One second: running.";
  sleep 1;
  $s.emit(42);
  $s.done;
}
$s.Supply.wait;
say "Two seconds: done";