Permalink
Cannot retrieve contributors at this time
16 lines (14 sloc)
298 Bytes
|
defmodule DistributedProcess do |
|
alias DistributedProcess.Supervisor |
|
|
|
def connect() do |
|
(1..5) |
|
|> Enum.map(fn i -> |
|
node = :"#{i}@127.0.0.1" |
|
{node, Node.connect(node)} |
|
end) |
|
end |
|
|
|
def request(id) do |
|
Supervisor.get_worker(id) |
|
|> GenServer.call(:request) |
|
end |
|
end |
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.