Dear everybody,

As Firefox moves each day more to an asynchronous execution model, we
keep facing issues related to dependencies between tasks. Here are a few
examples:
1. component A can only be initialized one or more other components have
reached some state;
2. off main thread I/O should only be shutdown once all components that
can use it have reached a state in which they don't need it anymore;
3. private browsing should be displayed only once the state of the
session has been (asynchronously) saved.

In our codebase, most of the synchronization is done through the
observer service. While this service has proved very useful, it is also
quite limited. For instance, using this service to implement a
dependency for scenario 2. above is rather tricky.

So, perhaps it is time to start working on a library (or at least a
design guideline) that will simplify our work refactoring Firefox into
asynchronicity.

As a base for discussion, I have put together a small RFC based on
promises: https://wiki.mozilla.org/RFC/TaskDependencies

Cheers,
 David

-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to