closed
ErrorsCollection

closed

Synthesised documentation from type/Channel

From type/Channel

See Original text in context

method closed(Channel:D: --> Promise:D)

Returns a promise that will be kept once the channel is closed by a call to method close.

my $c = Channel.new;
$c.closed.then({ say "It's closed!" });
$c.close;
sleep 1;