-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Closed
Description
For 'multipleResolves' to be useful in debugging scenarios, we should treat it as an error-like condition. However, Promise.race() implementation triggers it:
process.on('multipleResolves', function () {
console.log('multipleResolves', arguments)
// currently prints:
// multipleResolves [Arguments] { '0': 'resolve', '1': Promise { 'a' }, '2': 'b' }
})
Promise.race([Promise.resolve('a'), Promise.resolve('b')])I would recommend we change Promise.race() implementation in V8 to only call resolve once. Would it be something that could be landed in V8?
cc @benjamingr @BridgeAR @bmeurer @nodejs/v8 @nodejs/promises-debugging
Originally reported as mcollina/make-promises-safe#12.
- Version: 10.13.0
- Platform: all
- Subsystem: Promise
Metadata
Metadata
Assignees
Labels
No labels