4 ms·
It doesn't matter which version of node. The fact that promises must be resolved in the next tick is baked into the spec, no upgrade of node will ever improve t
by wereHamster 9y ago
It doesn't matter which version of node. The fact that promises must be resolved in the next tick is baked into the spec, no upgrade of node will ever improve that situation.
- ilaksh 9y agoRight but there were a lot of specific numbers so the context for specific benchmarks is versions. Anyway it sounds like we should try to fix the spec.
- deleted 9y ago[deleted]
- jkrems 9y ago> The fact that promises must be resolved in the next tick is baked into the spec From all I know, that statement is false. Promises aren't resolved in the next tick. They should be resolved as part of the microtask queue which can happen at the end of the tick (recursively). Promise.resolve() .then(() => console.log('1')) .then(() => console.log('2')) .then(() => console.log('still the same tick!')); setTimeout(() => console.log('timeout happening in the next tick'), 0); Result: 1 2 still the same tick! timeout happening in the next tick