Thanks for the pointer. <br><br>Looks like to use an unnamed server it I need to capture the returned PID and pass it through call (it wasn't clear that's the case via gen_server.erl; but it's more clear w/in gen.erl
), so that should work. <br><br>Thanks,<br>yc<br><br><div><span class="gmail_quote">On 10/25/07, <b class="gmail_sendername">Matthew O'Gorman</b> <<a href="mailto:mogorman@astjab.org">mogorman@astjab.org</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">if you read the man page or the docs, you dont have to register a name<br>to start start_link, also you can pass any term for the name so you
<br>can pass a pid for example or a tuple with a complex unique name.<br><br>anyways hope this helps<br><br>mog<br><br>On 10/25/07, YC <<a href="mailto:yinso.chen@gmail.com">yinso.chen@gmail.com</a>> wrote:<br>> Hi all -
<br>><br>> can there be multiple instances of a gen_server module on the same node?  I<br>> couldn't find the answer googling (though I probably missed it), but reading<br>> through the source code it seems that the server process is registered by
<br>> name, so by default it appears to be a singleton.<br>><br>> The gen_server start template from erlang mode and programming erlang looks<br>> like<br>><br>> gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
<br>><br>> Could it be that to enable multiple instances, instead of using ?MODULE as<br>> the name, I pass in a different name myself and explicitly pass the name<br>> through the API to get to the correct server?
<br>><br>> Any insights are appreciated, thanks,<br>> yc<br>><br>><br>><br>> _______________________________________________<br>> erlang-questions mailing list<br>> <a href="mailto:erlang-questions@erlang.org">
erlang-questions@erlang.org</a><br>> <a href="http://www.erlang.org/mailman/listinfo/erlang-questions">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>><br></blockquote></div><br>