Help language development. Donate to The Perl Foundation
Channel::Pauseable - A Channel which can be paused and more
use Channel::Pauseable; my $channel = Channel::Pauseable.new; $channel.send: ...; $channel.pause; $channel.resume; say $channel.recieve;
Channel::Pauseable is a Channel which can be paused and resumed.
There are various usage examples in the "examples" directory.
See Channel for methods inherited from there.
$paused is a Boolean and defaults to False. It determines the initial state of the Channel.
Pause output of the Channel. This method will throw an exception if Channel is already paused.
Resume output of the Channel. This method will throw an exception if Channel isn't paused.
True if Channel is paused.
This is the same as per a normal Channel but will always return Nil whilst the channel is paused.
These methods tap the given $source and feeds it into the channel.
Returns a live Supply that is supplied by this channel.
Timothy Hinchcliffe [email protected]
Copyright 2019 Timothy Hinchcliffe
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.