[erlang-questions] How to get a worker's pid() after restarted by supervisor?
fxmy wang
fxmywc@REDACTED
Thu Aug 29 09:03:29 CEST 2013
Hi dear fellow erlangers,
New to Erlang, I'm building a small comment backend for practice. By my
design there are many worker processes that handle comments posted from
different URLs, and these workers are all under simple_one_for_one
supervision.
I also decide to start a dispatcher process to map certain URL comment to
corresponding worker by worker_sup:start_child(URL) and then store returned
Pid.
So here comes the problem, I expect that worker may be restarted by
supervisor. Is there a way to get the worker's Pid after restarted by
supervisor, so that I can keep track of which URL comment should go for
which worker process?
Hope express myself clearly cause not a native speaker :)
B.R.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130829/ad876d7c/attachment.htm>
More information about the erlang-questions
mailing list