4 ms·
Yes! 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
by _asummers 9y ago
Yes! 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