4 ms·
Is it possible with Erlang to make sure that two Erlang processes are co-located on the same physical node?
by ngrilly 9y ago
Is it possible with Erlang to make sure that two Erlang processes are co-located on the same physical node?
- _asummers 9y agoYes! Each node has a name and you would look into the functions on the Node module on how to do that. In Elixir you'd say: iex(3)> defmodule Hello do ...(3)> def world() do ...(3)> IO.puts "here we go!" ...(3)> end ...(3)> end iex(4)> Node.spawn_link(:erlang.node(), fn -> Hello.world() end) here we go! #PID<0.101.0>
- ngrilly 9y agoThanks! I should have read Erlang docs: http://erlang.org/doc/man/erlang.html#spawn-2 http://erlang.org/doc/man/erlang.html#spawn-2