[erlang-questions] supervisor started from gen_server

Vance Shipley vances@REDACTED
Wed May 18 14:13:14 CEST 2011


On Wed, May 18, 2011 at 11:38:50AM +0200, Roberto Ostinelli wrote:
}  just a quick question: can you think of any case in which starting a
}  supervisor from a gen_server would actually be a perfectly fit idea?

Never.

                      +---------+
                      | foo_sup |
                      +-+-----+-+
                       /       \
           +----------+--+   +--+---------+
           | bar_sup_sup |   | foo_server |
           +---+---------+   +------------+
               |
          +----+----+
          | bar_sup |
          +---------+

Start a supervisor for the new dynamic supervisor(s) and use 
supervisor:start_child/2 from the gen_server to start it.

-- 
	-Vance



More information about the erlang-questions mailing list