-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
We've had the discussion and accepted that Promises/A+ promises are always asynchronous for then but what about for calls to resolve
let {promise, resolve} = defer();
console.log(1);
promise.then(() => console.log(4));
console.log(2);
resolve(null);
console.log(3);If resolve is allowed to be synchronous, this could result in:
1
2
4
3
But if it must be asynchronous then it must result in
1
2
3
4
Because of the restrictions of Promises/A+ it can never result in
1
4
2
3
So what's it to be? Do we force asynchronous behavior?
Metadata
Metadata
Assignees
Labels
No labels