class X::Channel::ReceiveOnClosed

Error due to calling receive on a closed channel
class X::Channel::ReceiveOnClosed {}

This exception is thrown when a calling receive on a Channel that has been closed:

my $s = Channel.new;
    $s.close;
    $s.receive;     # Cannot receive a message on a closed channel
    CATCH { default { put .^name, ': ', .Str } };
    # OUTPUT: «X::Channel::ReceiveOnClosed: Cannot receive a message on a closed channel␤»

Methods

method channel

method Channel(X::Channel::ReceiveOnClosed:D: --> Channel:D)

Returns the Channel object on which the receive method was called.

The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.