-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
doc, win: improve os.setPriority documentation #22817
Conversation
if (expected < PRIORITY_HIGH) | ||
assert.strictEqual(priority, PRIORITY_HIGHEST); | ||
assert.ok(priority === PRIORITY_HIGHEST || priority === PRIORITY_HIGH); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing this for all cases, can we make an explicit check for Windows and possibly for elevated user status before making this kind of assertion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for Windows only (see line 114)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, can we check for elevated status then? Perhaps using this method or something similar (without 3rd party utilities)?
Refs: nodejs/node#22817 PR-URL: #1985 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Landed in 6e746f1. |
Refs: nodejs/node#22817 Refs: libuv/help#64 PR-URL: libuv#2002 Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Also fixes the test: #22799
See https://support.microsoft.com/en-us/help/110853/prb-can-t-increase-process-priority
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes