multithreading - Java thread affinity - Stack Overflow
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/ind...