-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fest(std/node): implement os.getPriority() and os.setPriority() #4202
Conversation
0d44fa6
to
3125532
Compare
Looks like the test for API not yet implemented still contains calls to |
Thanks for the catch. the test for the api was implemented, but these one where not removed. |
7065898
to
947653f
Compare
3aa15b9
to
f180e6f
Compare
8ca3bce
to
f8994cb
Compare
Thanks @ecyrbe, I've added a few suggestions, but will leave the rust review to @ry. One further suggestion, what about making the different priority levels exposed as an enum, similiar to https://nodejs.org/api/os.html#os_priority_constants? This would make it more user friendly. Then the API could be something like:
|
i'll definitly add this to Deno api layer to ease deno developpement. |
Thanks, LGTM once the CI passes. Rust code still needs reviewed by someone with Rust experience. |
8107809
to
75ffc07
Compare
75ffc07
to
cff74d8
Compare
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.
Looks good! Just a few minor comments...
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'm not sure what permissions this needs, but surely both set and getPriority should not be allowed in the default mode.
Should i set Env permissions ? |
@ry Or should we create a new permission level? like :
|
@ry just a reminder, could you give me a hint at what route i should take for permissions ? see above comment. |
We've discussed this. For now we'd like to require |
thanks. i agree, i'll add it then. |
@ecyrbe I'm sorry we couldn't get this in. I'm going to close this because it's stale. In the future when we try to implement this again we will refer back to this patch. But at the moment the permissions situation is unresolved and the patch is now quite out of date. I'm going to close this because it's stale. I appreciate the work - it sucks when we don't land nice patches like this. |
Takes #4202 over Closes #17850 --------- Co-authored-by: ecyrbe <[email protected]>
this PR implement node os priority feature. see #3802 and #3403 .
It looks like it adds errno dependency, but is was already used by our current dependencies and listed in cargo.lock.
it uses our current dependencies to implement these functionalities :
a new internal crate (file priority.rs) was created to hide implementation the details from ops part.