Hacker News new | past | comments | ask | show | jobs | submit login

it's pretty trivial to implement a deterministic fork/join[0] in actors, mostly by using the strategy "ignore messages". Elixir does this with the Task.async/1 function.

https://hexdocs.pm/elixir/Task.html#module-async-and-await

[0] determinism can go out the window once there's an error. Can you safely say you know what happens in ruby if you are running async and one of your concurrently running async functions throws?

The nice thing in elixir there is zero ambiguity as to what happens if you have (N) async functions running and one of them crashes -- it brings down all of the other threads and triggers their respective resource cleanups in exactly the way that they do as actors, since Task is a fairly trivial wrapping of erlang's actors. (Or you have choices!!, you can async_nolink if you want your async function to plow forward even if its parent dies due to the crash of one of its siblings)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: