-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Hello folks. First off I recognize that (despite your support guidelines) I am asking a support question, that has already received an answer on Stack Overflow. But a disadvantage of that channel is that I can't tell if that's an "official" recommendation or just some random user trying to be helpful.
I also feel like this discussion should be documented somewhere on bluebirdjs.com, whereas currently async functions don't get any mention there. (Closest is a mention of C#'s async functionality on Promise.coroutine. But what about in JS? async/await have been natively supported for multiple versions of V8 now.)
So—do the Bluebird maintainers have any position on the best way to use Bluebird with async functions, with an eye to functionality and/or performance? Suggestions:
- somehow cause
asyncfunctions to return instances of Bluebird promises rather than native promises? (Noting that changingglobal.Promiseis not sufficient as shown here and here. It sounds like this guy may have found a way to do this but he doesn't show his code unfortunately. I have a comment pending on that post, we'll see.) - wrap
asyncfunctions inBluebird.method? - use a Babel plugin like this to convert
asyncmethods into Bluebird'scoroutineandmethodhelpers?
Related: #1426 (comment).