Skip to content

Commit

Permalink
Fix bugs in sink of HyperSeq/RaceSeq
Browse files Browse the repository at this point in the history
Remember to mark batches consumed, and construct the Sink correctly.
  • Loading branch information
jnthn committed Oct 17, 2017
1 parent ad0dd8e commit 41729e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Rakudo/Internals/HyperRaceSharedImpl.pm
Expand Up @@ -65,6 +65,7 @@ class Rakudo::Internals::HyperRaceSharedImpl {
has int $!batches-seen = 0;
method consume-batch(Rakudo::Internals::HyperWorkBatch $batch --> Nil) {
$!batches-seen++;
self.batch-used();
if $batch.last {
$!last-target = $batch.sequence-number;
}
Expand All @@ -79,7 +80,7 @@ class Rakudo::Internals::HyperRaceSharedImpl {
}
method sink(\hyper, $source --> Nil) {
if hyper.DEFINITE {
my $sink = Sink.new($source);
my $sink = Sink.new(:$source);
Rakudo::Internals::HyperPipeline.start($sink, hyper.configuration);
$*AWAITER.await($sink.complete);
CATCH {
Expand Down

0 comments on commit 41729e9

Please sign in to comment.