且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Java如何处理多线程?

更新时间:2022-03-28 22:49:46

您无法为特定线程设置处理器关联。但是,如果将程序拆分为两个进程,则应该能够将这些进程分配给操作系统级别的特定处理器。

You can't set processor affinity for specific Threads. But if you split your program into two processes, you should be able to assign those processes to specific processors at the OS level.

http://www.cyberciti.biz/tips/setting-processor-affinity-certain -task-or-process.html