<div dir="ltr">There is an ¬†implementation of Future/Promise in Elixir its called Task[1]<div><br></div><div>Example drawn from the documentation:</div><div><br></div><div><div class="gmail_extra">task = Task.async(fn -> do_some_work() end)</div><div class="gmail_extra">res = do_some_other_work()</div><div class="gmail_extra">res + Task.await(task)</div></div><div class="gmail_extra"><br></div><div class="gmail_extra">Reading the source[2] Task is a wrapper around proc_lib that monitors the calling process for error handling and uses patterns described by Joe in its implementation. Understanding the primitives would make implementing something similar in Erlang trivial</div><div class="gmail_extra"><br></div><div class="gmail_extra">1.¬†<a href="http://elixir-lang.org/docs/stable/elixir/Task.html">http://elixir-lang.org/docs/stable/elixir/Task.html</a></div><div class="gmail_extra">2.¬†<a href="https://github.com/elixir-lang/elixir/blob/v1.0.3/lib/elixir/lib/task.ex#L146-L209">https://github.com/elixir-lang/elixir/blob/v1.0.3/lib/elixir/lib/task.ex#L146-L209</a></div></div>