Promise/Future: asynchrony in 'then'
domenic at domenicdenicola.com
Wed May 1 09:35:08 PDT 2013
From: Sam L'ecuyer [sam at 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
More information about the es-discuss