You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has apparently been fixed in bluebird. I can't find the specific PR, but the above code chugs along (seemingly endlessly) and does not throw when using bluebird. Also, some highly unscientific benchmarking suggests a 2x / 3x performance increase using bluebird (this is echoed by a number of comments I came across on GitHub and SO).
The native-or-bluebird package is really small. It:
Checks for bluebird and returns that if found.
Checks for native and returns that if found.
Throws or returns undefined (depending on how you require it).
The text was updated successfully, but these errors were encountered:
I released [email protected] a bit prematurely, and have already
cut 3.0.0. It now handles a number of corner cases we were handling
manually:
1. Ensure callbacks are only called once
2. Require a promise implementation if no callback is provided
3. Ensure callbacks are called async
And a few we were missing:
1. Look for `bluebird` and fallback to native promises
2. Supress `unhandledRejection` notices on promises if user provides a callback (assumes the callback handles errors).
3. Consistent behavior if they return a promise that is rejected with `null` / `undefined`
4. Minor performance boost by only binding deferred.resolve/deferred.reject methods as needed
Closes#12
Apparently there are still some issues with V8's implementation of promises (and others):
Specifically, the following code quickly blows up with Native Promise implementations (I tried 0.12.7, and 4.1.2 native promises).
This has apparently been fixed in bluebird. I can't find the specific PR, but the above code chugs along (seemingly endlessly) and does not throw when using bluebird. Also, some highly unscientific benchmarking suggests a 2x / 3x performance increase using bluebird (this is echoed by a number of comments I came across on GitHub and SO).
The
native-or-bluebird
package is really small. It:undefined
(depending on how you require it).The text was updated successfully, but these errors were encountered: