pmap multimethod

Methods

pmap(e:Eachable1, mapper:Fun) Source: stdlib.ngs:4912
Parallel map. Runs mapper in threads. Each thread processes one element from the array but this might change in future (preserving the total number of calls to mapper and the order of results). Number of threads is limited to the lower of the two: processors * 100 or 1000.

Returns

Arr, result of applying mapper to elements of e, preserving the order.

Example

pages_texts = abs_pages_urls.pmap(F(url)  `lynx -dump $url`)
pmap(e:Eachable1, threads:Int, mapper:Fun) Source: stdlib.ngs:4933
Parallel map. Runs mapper in "threads" total threads.

Parameters

eEachable1 to be mapped
threadsnumber of threads to use
mappercalled with elements from e

Returns

Arr, result of applying mapper to elements of e, preserving the order.

Example

pages_texts = abs_pages_urls.pmap(F(url)  `lynx -dump $url`)