Skip to content

Instantly share code, notes, and snippets.

@onlyshk
Created October 14, 2011 14:59
Show Gist options
  • Save onlyshk/1287355 to your computer and use it in GitHub Desktop.
Save onlyshk/1287355 to your computer and use it in GitHub Desktop.
start(Pid) ->
register(my_process, spawn(module, loop, [Pid])).
loop(Pid) ->
receive
{From, give_pid} ->
From ! Pid
end,
loop(Pid).
@burinov
Copy link

burinov commented Oct 14, 2011

spawn(pid_holder, start, [Pid])

@onlyshk
Copy link
Author

onlyshk commented Oct 14, 2011

From ! {pid, Pid}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment