[erlang-questions] gen_server is a single
Vance Shipley
vances@REDACTED
Sun May 1 19:54:34 CEST 2011
On Mon, May 02, 2011 at 12:37:28AM +0800, 邢森 wrote:
} gen_server is a single process?
There is a behaviour named `gen_server' which is implemented in
a module with the name `gen_server.erl'. To use it you implement
your own callback module. To create a process running the gen_server
behaviour with your callback module you call `gen_server:start_link/3,4'.
} Is there any way to do multi-process?
You may create as many of these processes as you wish.
Typically with a server you intend to have other processes call it.
If your intent is to use parallel processing to increase the
processing capacity you will have to devise a method to distibute
the client calls to different server instances.
--
-Vance
More information about the erlang-questions
mailing list