<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
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 <b>one_for_one</b> or <b>one_for_all</b> supervisor with multiple child specifications, or a <b>simple_one_for_one</b> supervisor and then make multiple calls to <b>supervisor:start_child(Supervisor_name, Args)</b>.<div><br></div><div>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:</div><div><br></div><div><a href="http://www.erlang.org/doc/design_principles/sup_princ.html">http://www.erlang.org/doc/design_principles/sup_princ.html</a></div><div><br></div><div><a href="http://www.erlang.org/doc/design_principles/sup_princ.html"></a><a href="http://www.erlang.org/doc/man/supervisor.html">http://www.erlang.org/doc/man/supervisor.html</a><br><br></div><div>Chris Hicks.<br><hr id="stopSpelling">Date: Mon, 2 May 2011 00:37:28 +0800<br>From: fireflyc@gmail.com<br>To: erlang-questions@erlang.org<br>Subject: [erlang-questions] gen_server is a single<br><br><span class="ecxApple-style-span" style="font-family:arial, sans-serif;font-size:16px"><span class="ecxhps" title="?????????">gen_server</span> <span class="ecxhps" title="?????????">is a single</span> <span class="ecxhps" title="?????????">process</span><span title="?????????" class="ecx">?</span></span><div>
<span class="ecxApple-style-span" style="font-family:arial, sans-serif;font-size:16px"><span class="ecxhps" title="?????????"><br></span></span></div><div><span class="ecxApple-style-span" style="font-family:arial, sans-serif;font-size:16px"><span title="?????????" class="ecx"></span><span class="ecxhps" title="?????????">Is there any way</span> <span class="ecxhps" title="?????????">to</span> <span class="ecxhps" title="?????????">do</span> <span class="ecxhps" title="?????????">multi-process</span><span title="?????????" class="ecx">?</span></span><br>

</div>
<br>_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions</div>                                           </body>
</html>