On Wed, May 15, 2013 at 05:18:09PM -0400, Vladan Djeric wrote: > Hi all, > > I recently came across a situation where it would have been useful > to control the order in which components receive the same shutdown > notification. Specifically, Telemetry writes out session data to the > profile dir during the "profile-before-change" event, but it needs > to include any measurements reported by other components while they > are handling the same "profile-before-change" notification. So > ideally, Telemetry would be the last observer to get the > notification. > > As an additional example, OS.File needs to be the second-last > observer of "profile-before-change", since it needs to service new > requests to OS.File from other components during their handling of > "profile-before-change", but it also needs to record measurements in > Telemetry before Telemetry has handled the same event. > > I'd like to know if these use-cases are sufficiently rare that we > should just add new shutdown events when needed (e.g. we added > "profile-before-change2" for Telemetry in bug 844331), or if we > should come up with a general way to impose order of shutdown based > on dependencies?
I believe roc proposed just having an explicit hard coded list of things to start up a while ago, and I'm tempted to say that's what we should do for shutdown too. So just add an explicit call to some os.file thing followd by a call to a telemetry function after profile-before-change but not after anything else. Trev > > Thanks, > Vladan > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform