initializing process
paweł kamiński
kamiseq@REDACTED
Thu Sep 17 17:48:07 CEST 2009
can somebody corrects me (and hopefully help with my problem).
so the problem is like that
1)Im starting a server in erlang and among others I create one process that
needs to decide if another local computer is up before whole server's
initialization process is done.
2)the process is simple gen_server
(AND HERE IS A PROBLEM)
3)as long as I dont return from init/1 fun, my process is not seen (I cant
really use self() - is that correct??) by others so I CANT RECEIVE ANY
MESSAGES. so I though I can spawn another processes while in init/1 that
will loop and ping another side if it is ready. but I am afraid that there
might be a chance that the gen_server will not yet return from init and
spawned worker will try to send some notification, so or I will miss it or
there will be some error.
is this really a problem or Im just missing something here that is so
obvious.
All I really need is to init state of the gen_server, then start dynamically
initializing the server so I cant hard code all conditions in init fun and I
need to communicate with other processes.
hope it is more or less clear
take care
pozdrawiam
Paweł Kamiński
kamiseq@REDACTED
pkaminski.prv@REDACTED
______________________
More information about the erlang-questions
mailing list