Skip to content

Commit

Permalink
Make sure Supplier.emit takes Mu
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Aug 29, 2018
1 parent 8b38c7d commit 20de0d4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions S17-supply/basic.t
Expand Up @@ -4,17 +4,24 @@ use lib $?FILE.IO.parent(2).add("packages");
use Test;
use Test::Util;

plan 78;
plan 80;

for ThreadPoolScheduler.new, CurrentThreadScheduler -> $*SCHEDULER {
diag "**** scheduling with {$*SCHEDULER.WHAT.perl}";

{
my $s = Supplier.new;
$s.Supply.tap( -> \val { ok val =:= Mu } );
$s.emit(Mu);
$s.done;
}

{
my $s = Supplier.new;

my @vals;
my $saw_done;
my $tap = $s.Supply.tap( -> $val { @vals.push($val) },
$s.Supply.tap( -> $val { @vals.push($val) },
done => { $saw_done = True });

$s.emit(1);
Expand Down

0 comments on commit 20de0d4

Please sign in to comment.