Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Spec the Supply.buffering( :overlap )
Or maybe we should separate this into a .rotor method, as the use is really
different.
  • Loading branch information
lizmat committed Apr 20, 2014
1 parent d6cdde4 commit 692aa10
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions S17-concurrency.pod
Expand Up @@ -601,10 +601,16 @@ L<List.squish>).

my $b = $s.buffering( :elems(100), :seconds(1) );

my $b = $s.buffering( :elems(2), :overlap(1) );

Produces a C<Supply> that buffers the values of the given Supply by either
the number of elements (using the C<elems> named parameter) or the maximum
number of seconds (using the C<seconds> named parameter) or both. Values
are grouped in a single array element when flushed.
number of seconds (using the C<seconds> named parameter) or both.

Or produces a "rotoring" C<Supply> where the last elements (as specified by
the C<overlap> named parameter) are kept when the buffer is flushed.

Values are grouped in a single array element when flushed.

=item delayed

Expand Down

0 comments on commit 692aa10

Please sign in to comment.