[erlang-questions] Registered processes:

Fredrik Hoback <>
Sun Mar 25 14:27:37 CEST 2007


Hi, I'm new to erlang but I have some questions regarding process registration.
I have these 2 modules that I want to send messages between with Pid !
Msg for example. As I start my first module a gen_server (alpha) from
the shell which spawns away with spawn(?MODULE,start,[]). It sits
around waiting for incoming messages. Then also from the same shell I
start my other module (beta) which begins with register(?MODULE,
self()). Now when the gen_server receives a message that I want to
forward to my second module (beta). But I don't get any message, it
seems that it gets lost on the way. Is there a problem that the beta
module does a registration after the fact that alpha has already
started, because I use "beta ! Msg" to send the message from alpha to
beta.
---------------------------------
Regard's Fredrik Hoback
---------------------------------



More information about the erlang-questions mailing list