W3C home > Mailing lists > Public > public-nextweb@w3.org > July 2013

Re: Task Queues as a primitive

From: Marcos Caceres <w3c@marcosc.com>
Date: Mon, 1 Jul 2013 17:04:44 +0100
To: Tobie Langel <tobie@w3.org>
Cc: "public-nextweb@w3.org" <public-nextweb@w3.org>
Message-ID: <659D234268224ADF80E1B31308C75D17@marcosc.com>

On Monday, July 1, 2013 at 4:24 PM, Tobie Langel wrote:

> On Monday, July 1, 2013 at 5:21 PM, Marcos Caceres wrote:
> > The HTML spec speaks a lot about task queues [1] and "spin the event loop" [2], but there are only limited ways for devs to hook into those today. Would be nice if there was some primitive that allowed JS developers to hook into the loop without relying on hacks like setTimeout and MutationObserver. It would also be nice to see what is in those task queues (ordering, etc) and in which order the task queues are processed. 
> > 
> > Thoughts (or does anyone know of related threads else where)? Should we add that to the list of "primitives" we need for the platform?
> Something akin to node.js's process.nextTick would be a good start.

There is also the setImmidate() spec (which seems to have stagnated for a few years!):


There is a prollyfill: 

> I'm not sure we need the introspection capabilities nor what kind of security problem opening that up might cause.

True. Probably don't need that (or can implement the queues locally as needed without hooking into browser's ones). 
Marcos Caceres
Received on Monday, 1 July 2013 16:05:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:05:54 UTC