[erlang-questions] Erlang and Akka, The Sequel

ayodele abejide <>
Fri Apr 3 15:37:10 CEST 2015


There is an  implementation of Future/Promise in Elixir its called Task[1]

Example drawn from the documentation:

task = Task.async(fn -> do_some_work() end)
res = do_some_other_work()
res + Task.await(task)

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

1. http://elixir-lang.org/docs/stable/elixir/Task.html
2.
https://github.com/elixir-lang/elixir/blob/v1.0.3/lib/elixir/lib/task.ex#L146-L209
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150403/daf8674d/attachment.html>


More information about the erlang-questions mailing list