On Tue, Jan 27, 2015 at 10:10 PM, Josh Matthews <j...@joshmatthews.net> wrote:
> I started prototyping the async networking redesign. To make the up-front > work easier, I've added a layer of abstraction so consumers can opt-in to > receiving async replies so I don't need to rewrite everything all at once. > This has led me to a discovery - our current implementation of sync XHR > works really well (spec-compliant, even!) using channels, and we'll need to > introduce something like nested event loops if we insist on switching > wholesale to async events for all consumers. This is something that I would > _really_ like to avoid doing. > > Patrick, I know you've been keen on the network rewrite eliminating the > pattern of sending channels over channels. How bad would it be if we kept > this capability but barely made use of it? > > Cheers, > Josh > _______________________________________________ > dev-servo mailing list > dev-servo@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-servo > I'm not really sure what servo's event loop architecture looks like, but one of the things we'd love to do with Gecko but would require tremendous effort at this point is split the event queue per window/document/something. Then we'd implement sync XHR by just blocking the relevant queue and continuing to process messages via a scheduler. If you have the opportunity to build something similar in from the beginning you should strongly consider taking it. - Kyle _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo