The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Ryu::Sink - base representation for a thing that receives events

DESCRIPTION

This is currently of limited utility.

 my $src = Ryu::Source->new;
 my $sink = Ryu::Sink->new;
 $sink->from($src);
 $sink->source->say;

METHODS

from

Given a source, will attach it as the input for this sink.

The key difference between "from" and "drain_from" is that this method will mark the sink as completed when the source is finished. "drain_from" allows sequencing of multiple sources, keeping the sink active as each of those completes.

INHERITED METHODS

Ryu::Node

completed, describe, flow_control, is_paused, label, new_future, parent, pause, resume, unblocked

AUTHOR

Tom Molesworth <TEAM@cpan.org>

LICENSE

Copyright Tom Molesworth 2011-2024. Licensed under the same terms as Perl itself.