Exun.MProc (exun v0.5.0)
Exun is intense in tuple management and recursion. This module is a try to buil tuple's element in parallel using Task. The macro mp is responsible for that.
Link to this section Summary
Functions
Build tuple in async mode, so every element of the tuple is spawned in its own process. Only for tuple sizes greater than 2
Link to this section Functions
Build tuple in async mode, so every element of the tuple is spawned in its own process. Only for tuple sizes greater than 2
For example:
:timer.tc(fn -> {:timer.sleep(1000), :timer.sleep(1000), :timer.sleep(1000)} end) {3002269, {:ok, :ok, :ok}}
:timer.tc(fn -> mp {:timer.sleep(1000), :timer.sleep(1000), :timer.sleep(1000)} end) {1001001, {:ok, :ok, :ok}}