[erlang-questions] gen_server is a single

Chris Hicks silent_vendetta@REDACTED
Sun May 1 19:37:31 CEST 2011


Each gen_server is, indeed, a single process. What you can do, however, is spawn multiple gen_servers under a single supervisor. You can do this by creating a one_for_one or one_for_all supervisor with multiple child specifications, or a simple_one_for_one supervisor and then make multiple calls to supervisor:start_child(Supervisor_name, Args).
Either of these methods will give you multiple gen_server processes under a supervision tree, it just depends on exactly what you want to do. I recommend reading up on these following two links:
http://www.erlang.org/doc/design_principles/sup_princ.html
http://www.erlang.org/doc/man/supervisor.html

Chris Hicks.
Date: Mon, 2 May 2011 00:37:28 +0800
From: fireflyc@REDACTED
To: erlang-questions@REDACTED
Subject: [erlang-questions] gen_server is a single

gen_server is a single process?

Is there any way to do multi-process?




_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://erlang.org/mailman/listinfo/erlang-questions 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110501/106257b5/attachment.htm>


More information about the erlang-questions mailing list