select each…from_§in parallel«_-way»where_

Definitions:

literal phrase ⇒ token, expression phrase ⇒ set, natural number?, []→boolean
Source: /avail/Avail/Foundation/Concurrency
Categories: Concurrency, Control Structures, Loops, Collections, Sets, Transformers
Concurrently apply predicate to each consecutive element of aSet, collecting elements for which filter answered true into a new set (and preserving ordering of the transformed elements). Answer this set.
Position Name Type Description
Parameters
1 elementPhrase literal phrase ⇒ token A literal phrase holding a synthetic literal token whose value is the name of the loop variable. The generated loop variable is given the strongest possible type based on the type union of the leading types and default type of aTuple.
2 aSet expression phrase ⇒ set An expression phrase that yields the set to iterate over
3 optionalLimit natural number? If specified, then the maximum number of worker fiber s permitted to run in parallel. If not specified, then permit default maximum worker fibers worker fiber s to run in parallel.
4 predicate []→boolean A filter function that accepts an arbitrary element of the set and answers true if the element should be accumulated into the result.
Returns set A set of elements from aSet for which predicate answered true.
Raises
worker exception If any of the forked workers raise an exception.
literal phrase ⇒ token, expression phrase ⇒ tuple, natural number?, []→boolean
Source: /avail/Avail/Foundation/Concurrency
Categories: Concurrency, Control Structures, Loops, Collections, Tuples, Transformers
Concurrently apply predicate to each consecutive element of aTuple, collecting elements for which filter answered true into a new tuple (and preserving ordering of the transformed elements). Answer this tuple.
Position Name Type Description
Parameters
1 elementPhrase literal phrase ⇒ token A literal phrase holding a synthetic literal token whose value is the name of the loop variable. The generated loop variable is given the strongest possible type based on the type union of the leading types and default type of aTuple.
2 aTuple expression phrase ⇒ tuple An expression phrase that yields the tuple to iterate over
3 optionalLimit natural number? If specified, then the maximum number of worker fiber s permitted to run in parallel. If not specified, then permit default maximum worker fibers worker fiber s to run in parallel.
4 predicate []→boolean A filter function that accepts an arbitrary element of the tuple and answers true if the element should be accumulated into the result.
Returns tuple A tuple of elements from aTuple for which predicate answered true.
Raises
worker exception If any of the forked workers raise an exception.