Java thread affinity

You can’t do this in pure java. But if you really need it — you can use JNI to call native code which do the job. This is the place to start with: http://ovatman.blogspot.com/2010/02/using-java-jni-to-set-thread-affinity.html http://blog.toadhead.net/index.php/2011/01/22/cputhread-affinity-in-java/ UPD: After some thinking, I’ve decided to create my own class for this: ThreadAffinity.java It’s JNA-based, and very simple — …

Read more