[erlang-questions] gen_server as Pid based callback

Tim Watson watson.timothy@REDACTED
Mon Sep 6 12:45:15 CEST 2010


> later callback. I want to explore how gen_server registered/supervised
> process can be used for this purpose.
> How to use registered/supervised gen_server in place of Pid.
> --

Starting a process with gen_server:start returns {ok, Pid}, so you can
always stash the Pid away for later use. If you want the Pid for a
registered process you can call erlang:whereis/1 for a locally
registered process and/or global:whereis_name/1 for a globally
registered name. Not sure what you're asking about supervised
processes. This stuff is very well documented - http://erlang.org/doc.

Hope that helps,

Tim


More information about the erlang-questions mailing list