-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Doesn't take CPU affinity into account #12
Comments
jonhoo
added a commit
to jonhoo/volley
that referenced
this issue
Jun 19, 2015
This is necessary because num_cpus currently does not take core affinity into account: seanmonstar/num_cpus#12
jonhoo
added a commit
to jonhoo/volley
that referenced
this issue
Jun 19, 2015
This is necessary because num_cpus currently does not take core affinity into account: seanmonstar/num_cpus#12
I'd welcome a PR! |
Seems like unless we want to do some deep systems level hackery, we'll have to wait for rust-lang/rfcs#819 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While
num_cpus()
gives the correct number of physical CPUs, it does not take into account which of those CPU's the current process is actually allowed to use. It would be neat to be able to specify which of the two numbers to get.For example, consider a simple
num_cpus
program that just prints the value ofnum_cpus::get();
, and then exits:If it's at all helpful, the source for
nproc
(which is included in coreutils) can be seen here.The text was updated successfully, but these errors were encountered: