File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -372,13 +372,17 @@ C<&mapper> and emits it to the new supply.
372
372
373
373
=head2 method batch
374
374
375
- method batch(Supply:D: :$elems, :$seconds --> Supply:D)
375
+ method batch(Supply:D: :$elems, :$seconds, :$emit-timed --> Supply:D)
376
376
377
377
Creates a new supply that batches the values of the given supply by either
378
378
the number of elements in the batch (using C<:elems>) or a duration
379
379
(using C<:seconds>) or both. Any remaining values are emitted in
380
380
a final batch when the supply is done.
381
381
382
+ When C<:emit-timed> is specified, a timer will run, emitting
383
+ whatever is in the batch every given number of C<:seconds>, if the
384
+ batch contains any values.
385
+
382
386
B<Note>: Since Rakudo release 2020.12, the C<:seconds> parameter has
383
387
a millisecond granularity: for example a 1 millisecond duration could
384
388
be specified as C<:seconds(0.001)>. Before Rakudo release 2020.12,
You can’t perform that action at this time.
0 commit comments