race
ErrorsCollection

race

Synthesised documentation from type/Iterable type/HyperSeq type/RaceSeq

From type/Iterable

See Original text in context

method race(Int(Cool:$batch = 64Int(Cool:$degree = 4 --> Iterable)

Returns another Iterable that is potentially iterated in parallel, with a given batch size and degree of parallelism (number of parallel workers).

Unlike hyper, race does not preserve the order of elements (mnemonic: in a race, you never know who will arrive first).

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 hyper for situations where you want items processed in parallel and the output order should be kept relative to the input order.

blog post on the semantics of hyper and race

See hyper for an explanation of :$batch and :$degree.

From type/HyperSeq

See Original text in context

method race(HyperSeq:D:)

Creates a RaceSeq object out of the current one.

From type/RaceSeq

See Original text in context

method race(RaceSeq:D:)

Returns the object.