Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reflow and check definition
  • Loading branch information
JJ committed May 17, 2019
1 parent f1e7907 commit 8c2c982
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions doc/Type/Iterable.pod6
Expand Up @@ -58,8 +58,8 @@ Defined as:
method flat(--> Iterable)
Returns another L<Iterable|/type/Iterable> that flattens out all iterables that the
first one returns.
Returns another L<Iterable|/type/Iterable> that flattens out all iterables that
the first one returns.
For example
Expand Down Expand Up @@ -90,7 +90,7 @@ Returns a lazy iterable wrapping the invocant.
Defined as:
method hyper(Int(Cool) :$batch = 64, Int(Cool) :$degree = 4 --> Iterable)
method hyper(Int(Cool) :$batch = 64, Int(Cool) :$degree = 4)
Returns another Iterable that is potentially iterated in parallel, with
a given batch size and degree of parallelism.
Expand Down Expand Up @@ -134,7 +134,8 @@ overhead, picking a number somewhere in the middle makes sense. Your aim
might be to keep all workers about evenly busy to make best use of the
resources available.
B«L<Blog post on the semantics of hyper and race|https://6guts.wordpress.com/2017/03/16/considering-hyperrace-semantics/>»
You can also check out this
B«L<blog post on the semantics of hyper and race|https://6guts.wordpress.com/2017/03/16/considering-hyperrace-semantics/>»
=head2 method race
Expand All @@ -145,16 +146,20 @@ Defined as:
Returns another Iterable that is potentially iterated in parallel, with a
given batch size and degree of parallelism (number of parallel workers).
Unlike L«C<hyper>|/routine/hyper», C<race> does not preserve the order of elements.
Unlike L«C<hyper>|/routine/hyper», C<race> does not preserve the order of
elements.
say ([1..100].race.map({ $_ +1 }).list);
Use race in situations where it is OK to do the processing of items in parallel, and the output order does not matter. See L«C<hyper>|/routine/hyper» for situations where you want items processed in parallel and the output order should be kept relative to the input order.
Use race in situations where it is OK to do the processing of items in parallel,
and the output order does not matter. See L«C<hyper>|/routine/hyper» for
situations where you want items processed in parallel and the output order
should be kept relative to the input order.
B«L<Blog post on the semantics of hyper and race|https://6guts.wordpress.com/2017/03/16/considering-hyperrace-semantics/>»
See L«C<hyper>|/routine/hyper» for an explanation of C<:$batch> and C<:$degree>.
=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

0 comments on commit 8c2c982

Please sign in to comment.