Re: [dev-servo] Channels and synchronous networking

2015-01-28 Thread Manish Goregaokar
Perhaps if we had some sort of priority system to the queue, where high priority events (navigation, etc) override the other ones? -Manish Goregaokar On Thu, Jan 29, 2015 at 2:00 AM, Boris Zbarsky wrote: > On 1/28/15 12:33 PM, Josh Matthews wrote: > >> I'm not certain what you're asking. The ev

Re: [dev-servo] Channels and synchronous networking

2015-01-28 Thread Boris Zbarsky
On 1/28/15 12:33 PM, Josh Matthews wrote: I'm not certain what you're asking. The events come from another thread, so they need through some kind of event queue. Today, that's the per-origin event loop. OK. That means, for example, that you can't navigate away from a page that's in the middle

Re: [dev-servo] Channels and synchronous networking

2015-01-28 Thread Josh Matthews
On 2015-01-28 5:12 PM, Boris Zbarsky wrote: On 1/28/15 11:49 AM, Josh Matthews wrote: Those are good points. Since those events go through the regular script event loop Should they, though? I'm not certain what you're asking. The events come from another thread, so they need through some ki

Re: [dev-servo] Channels and synchronous networking

2015-01-28 Thread Boris Zbarsky
On 1/28/15 11:49 AM, Josh Matthews wrote: Those are good points. Since those events go through the regular script event loop Should they, though? we would presumably have to process every pending script event in line before them, which could be bad? Stuff like >setTimeout(function() { windo

Re: [dev-servo] Channels and synchronous networking

2015-01-28 Thread Josh Matthews
On 2015-01-28 3:21 PM, Boris Zbarsky wrote: On 1/28/15 7:21 AM, Josh Matthews wrote: My current line of thinking is that we send a message to the compositor that puts the pipeline in the modal state and pops up a dialog. Additionally, the message contains a Sender, with the script task waiting s

Re: [dev-servo] Channels and synchronous networking

2015-01-28 Thread Boris Zbarsky
On 1/28/15 7:21 AM, Josh Matthews wrote: My current line of thinking is that we send a message to the compositor that puts the pipeline in the modal state and pops up a dialog. Additionally, the message contains a Sender, with the script task waiting synchronously on the corresponding Receiver; w

Re: [dev-servo] Channels and synchronous networking

2015-01-28 Thread Josh Matthews
My current line of thinking is that we send a message to the compositor that puts the pipeline in the modal state and pops up a dialog. Additionally, the message contains a Sender, with the script task waiting synchronously on the corresponding Receiver; when the alert box is closed, the compos

Re: [dev-servo] Channels and synchronous networking

2015-01-27 Thread Boris Zbarsky
On 1/27/15 5:46 PM, Josh Matthews wrote: We don't have the notion of a global event loop or anything. We effectively have an event loop per script task (ie. event loop per TLD), but no ability to spin it arbitrarily at the moment. How do you plan to implement alert()? Do you plan to allow an a

Re: [dev-servo] Channels and synchronous networking

2015-01-27 Thread Josh Matthews
We don't have the notion of a global event loop or anything. We effectively have an event loop per script task (ie. event loop per TLD), but no ability to spin it arbitrarily at the moment. The benefit of using channels for some forms of communication is that they side-step the event loop and c

Re: [dev-servo] Channels and synchronous networking

2015-01-27 Thread Kyle Huey
On Tue, Jan 27, 2015 at 10:10 PM, Josh Matthews 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 le