Handbook
Glossary
parallel-map ( seq quot: ( elt -- newelt ) -- newseq )
Concurrent combinators
Prev:
2parallel-each ( seq1 seq2 quot: ( elt1 elt2 -- ) -- )
Next:
2parallel-map ( seq1 seq2 quot: ( elt1 elt2 -- newelt ) -- newseq )
Vocabulary
concurrency
.
combinators
Inputs
seq
a
sequence
quot
a
quotation
with stack effect
( elt -- newelt )
Outputs
newseq
a
sequence
Word description
Spawns a new thread for applying
quot
to every element of
seq
, collecting the results at the end.
Errors
Throws an error if one of the iterations throws an error.
Definition
USING:
concurrency.combinators.private
sequences
;
IN:
concurrency.combinators
:
parallel-map
( seq quot: ( elt -- newelt ) -- newseq )
[future]
map
future-values
;
inline