Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
s/buffering/batch
  • Loading branch information
lizmat committed Apr 21, 2014
1 parent 32b4e5a commit b1e0e4f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions S17-concurrency/supply.t
Expand Up @@ -290,17 +290,17 @@ for (ThreadPoolScheduler, CurrentThreadScheduler) {
is_deeply @res.sort, [1..15], "merging 3 supplies works";
}

tap_ok Supply.for(1..14).buffering(:elems(5)),
tap_ok Supply.for(1..14).batch(:elems(5)),
[[1..5],[6..10],[11..14]],
"we can buffer by number of elements";
"we can batch by number of elements";

{
my $for = Supply.for(1..10);
my $buffering = $for.buffering(:elems(1)),
ok $for === $buffering, "buffering by 1 is a noop";
tap_ok $buffering,
my $for = Supply.for(1..10);
my $batch = $for.batch(:elems(1)),
ok $for === $batch, "batch by 1 is a noop";
tap_ok $batch,
[1..10],
"noop buffering";
"noop batch";
}

tap_ok Supply.for(1..5).rotor,
Expand All @@ -309,7 +309,7 @@ for (ThreadPoolScheduler, CurrentThreadScheduler) {

tap_ok Supply.for(1..5).rotor(3,2),
[[1,2,3],[2,3,4],[3,4,5],[4,5]],
"we can buffer by number of elements and overlap";
"we can rotor by number of elements and overlap";

{
my $for = Supply.for(1..10);
Expand Down

0 comments on commit b1e0e4f

Please sign in to comment.