W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

RE: Promise/Future: asynchrony in 'then'

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Wed, 1 May 2013 16:35:08 +0000
To: Sam L'ecuyer <sam@cateches.is>, Alex Russell <slightlyoff@google.com>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>, es-discuss <es-discuss@mozilla.org>
Message-ID: <B4AE8F4E86E26C47AC407D49872F6F9F7EF66A6F@BY2PRD0510MB354.namprd05.prod.outlook.com>
From: Sam L'ecuyer [sam@cateches.is]

> These may all be wrong, but all seem to be hitting at the fact that "in a new turn" is the *easiest* way to force asynchronicity.  Maybe we need to specify that all callbacks must be invoked asynchronously, regardless of which turn in the event loop they occur.

We need to figure out what invariants we are enforcing, and codify them with code samples and tests. Then we can figure out the best way to specify that with words; whether the exact mechanism is microtasks or macrotasks doesn't matter, as long as the invariants are preserved.

So far we have three example invariants in Promises/A+ land; more welcome: https://github.com/promises-aplus/promises-spec/pull/104#issuecomment-17290173
Received on Wednesday, 1 May 2013 16:35:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:49 UTC