-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PTR: Promises are back #9
Comments
Do we have any reliable method to disable async/await mechanic in Node.js? |
Since the node devs have marked this issue as "wontfix"[1] I'm getting the impression they're never going to resolve it. This may be one of those areas that needs an explicit rule telling people not to do it, with a punishment for those who do and maybe a mechanism on code upload to flag code for review by your team that may be breaking the rules. Otherwise I feel you're going to be playing whack-a-mole as people find ways to bypass things. [1] nodejs/node#3020 |
AFAIK theres no way to disable without recompiling node and/or v8 to disable it, even then I'm not sure it cna be disabled without modifying sources. |
We're trying to look into threaded architecture now. If we manage to separate event loops for every user, it will not only allow to control what user is executing within his loop, but also to isolate GC for this single user. |
@laverdet managed to patch Node.js for us that makes timeout and SIGINT work with pending Promises and other scheduled async code. Here is the patch:
We're now testing this patch on Node.js 7.10.0 on the PTR. |
This patch is deployed to production. |
Promises were disabled in #6 to prevent timeout skipping, with PTR on Node 7.9 Promises can be restored and used via the new async/await feature as seen below, this effectively readds the Promise class to global.
The text was updated successfully, but these errors were encountered: