public class ThreadAffinity extends Object
Please note that the library should be available in the classpath during runtime.
Currently it support Windows and Linux.
Modifier and Type | Class and Description |
---|---|
static class |
ThreadAffinity.cpu_set_t |
Constructor and Description |
---|
ThreadAffinity() |
Modifier and Type | Method and Description |
---|---|
static long |
setAffinity(int[] cpuIndexes)
Sets the thread affinity for the current thread.
|
public static long setAffinity(int[] cpuIndexes)
cpuIndexes
- logical processors list that a thread is allowed to run on (first logical CPU has index 0).Copyright © 2005–2024 Onix Solutions. All rights reserved.