[erlang-questions] Staring more than one instance of a gen_server

Ahmed Omar spawn.think@REDACTED
Thu Oct 14 22:31:38 CEST 2010

Hi Ken,
It all depends on your purposes. If you want to start these processes as a
part of a supervision tree, so you would probably like to use
simple-one-for-one strategy and children dynamically
supervisor:start_child(Sup, List)

On Thu, Oct 14, 2010 at 5:15 PM, Ken Robinson <kenrobinsonster@REDACTED>wrote:

> Hi All,
> If I wanted to start more than one instance of a gen_server what is
> the best practice? The gen_servers would be exactly the same except
> for the seeding parameters. From what I've found I could use the child
> spec and seed with specific names through the arguments like so:
> start_link(PortNumber, MySpecialName) -> gen_server:start_link({local,
> MySpecialName, ?MODULE, PortNumber, []).
> Would that work?
> --
> regards,
> Ken Robinson
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED

Best Regards,
- Ahmed Omar
Follow me on twitter
@spawn_think <http://twitter.com/#!/spawn_think>

More information about the erlang-questions mailing list