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  | 
static class  | 
ThreadAffinity.ErrorInfo  | 
| Modifier and Type | Field and Description | 
|---|---|
static int | 
INVALID_CPU_INDEX  | 
static int | 
THREAD_AFFINITY_NOT_AVAILABLE  | 
| Constructor and Description | 
|---|
ThreadAffinity()  | 
| Modifier and Type | Method and Description | 
|---|---|
static ThreadAffinity.ErrorInfo | 
getLastError()  | 
static long | 
setAffinity(int[] cpuIndexes)
Sets the thread affinity for the current thread. 
 | 
public static final int THREAD_AFFINITY_NOT_AVAILABLE
public static final int INVALID_CPU_INDEX
public static long setAffinity(int[] cpuIndexes)
cpuIndexes - logical processors list that a thread is allowed to run on (first logical CPU has index 0).public static ThreadAffinity.ErrorInfo getLastError()
Copyright © 2005–2025 Onix Solutions. All rights reserved.