# New Ticket Created by Pierre VIGIER
# Please include the string: [perl #129247]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=129247 >
Hi,
i stumbled a across a strange behaviour when playing with Supplier, i tried to
gulf it down, starting from the documentation of supply. The following code,
taken from the documentation and slightly modified is working as expected:
my $s = Supplier.new;
my $l = $s.Supply();
start {
sleep 1;
$s.emit(1);
$s.emit(2);
$s.done;
}
$l.wait;
say "done";
If i tap the $l variable to display the value that are supplied by the
supplier, it then hangs indefinitely:
my $s = Supplier.new;
my $l = $s.Supply();
$l.tap( -> $v { say "got : $v" } );
start {
sleep 1;
$s.emit(1);
$s.emit(2);
$s.done;
}
$l.wait;
say "done";
Pierre