[erlang-questions] noob gen_leader question

db masterofquestions@REDACTED
Fri Apr 18 06:21:52 CEST 2008


My erlang nodes are setup to connect to each other automatically.
Patched version of gen_leader states that it was modified to start
only on local mode and user has to trigger the election mode. This
means each instance of gen_leader is myopic and is contained within a
single node that it is running on.  How does a user trigger the
election mode so that all other the instances of gen_leader know the
existence of each other?

It starts off with global mode:
elected([], {election,<0.64.0>,global,aname,a@REDACTED,

Then it goes into local mode:
initial call: gen:init_it(gen_leader,<0.62.0>,self,
                              {local,aname},

On Sun, Apr 13, 2008 at 3:57 PM, Ulf Wiger (TN/EAB)
<ulf.wiger@REDACTED> wrote:
> db skrev:
>
>
> > Does worker instance of gen_leader spawn separate processes to perform a task concurrently like in pool module?
> >
>
> Not by default, no. If you want to spawn processes, you
> can of course do that in the callbacks.
>
> BR,
> Ulf W
>



-- 
rk

That which we persist in doing becomes easier for us to do; not that
the nature of the thing itself is changed, but that our power to do is
increased.
-Ralph Waldo Emerson



More information about the erlang-questions mailing list