Separate phase functions sounds good to me.  We should make it clear that
stuff within a phase should not be interdependent, but that might be hard to
verify and enforce :-/
-Darin


On Thu, Jan 15, 2009 at 2:18 PM, Ben Goodger (Google) <b...@chromium.org>wrote:

>
> Here's my plan. The Mac and Linux people are probably going to proceed
> just by using ifdefs to get the startup sequence up and running, but
> in the process learn more about what goes on where. We can first split
> into separate phase functions for readability, and then after that
> figure out if any further steps are needed.
>
> -Ben
>
> On Thu, Jan 15, 2009 at 2:06 PM, Erik Kay <erik...@chromium.org> wrote:
> >
> > On Thu, Jan 15, 2009 at 1:37 PM, Brett Wilson <bre...@chromium.org>
> wrote:
> >>
> >> On Thu, Jan 15, 2009 at 1:19 PM, Amanda Walker <ama...@chromium.org>
> wrote:
> >>>
> >>> That's true.  In the example I gave (Mac driver loading), each module
> >>> has a property list that lists its dependencies (and version
> >>> requirements, etc.).  That's not quite as simple to do inside a single
> >>> application, of course, but having code do the ordering still seems
> >>> like a win to me.
> >>>
> >>> Consider startup as a sequence of, say:
> >>>
> >>> Initializer foo("foo");
> >>> foo.DependsOn("bar");
> >>> foo.DependsOn("zot");
> >>>
> >>> Initializer alice("alice");
> >>> alice.DependsOn("bob");
> >>> alice.DependsOn("eve");
> >>> [...]
> >>> Initializer::LaunchAll();
> >>>
> >>> (or, more generally, "Initializer:::Launch("chromium");" where
> >>> "chromium" is a top level module, so that the general framework could
> >>> be used for things besides app launch)
> >>
> >> I have a hard time thinking about this with your abstract example. I
> >> also have a hard time believing we have so many interdependencies that
> >> it requires writing a makefile to start the program, and that such a
> >> syntax is easier to read than just listing out in comments why things
> >> are done in this order.
> >
> > The issue is one of maintenance.  A lot happens at startup.  As people
> > make changes, it's not necessarily obvious where to insert your
> > initialization code.  Depending on your dependencies, your new service
> > may require a complex re-ordering of initialization.  If we actually
> > explicitly express dependencies and automatically manage them, then we
> > can be precise about it.
> >
> > Maybe we'd have to see an example to know for sure, but it feels like
> > it would be easier to read startup dependencies if they were expressed
> > explicitly as opposed to comments which don't need to be complete and
> > can drift from reality.
> >
> > Erik
> >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to