basho/riak_core — pull request #602 by jtuple (2014-06-11 23:38:10+00:00)
Title: Fix riak_core_util:pmap/2 infinite stall

This commit changes `riak_core_util:pmap/2` to use `spawn_link` rather than `spawn` to create the asynchronous processes. Without this change, `pmap/2` can stall forever if any of these processes crashes -- eg. by using a map function that generates an error.

This commit also fixes the function -spec as well as optimizes the final stage of the pmap by using a list comprehension rather than `lists:unzip` (this is faster and generates less garbage).