peter-lawrey/Java-Thread-Affinity — Issue #18: Include strategy: Same socket, different core
Author: akerbos
Created: 2012-03-01 16:10:44+00:00
State: open

See the title; it is impossible to model this with existing strategies but I think it is quite important for machines with multiple sockets which have multiple cores each. Therefor I think it should be included in `AffinityStrategies`.

```java
SAME_SOCKET_DIFFERENT_CORE {
public boolean matches(int cpuId, int cpuId2) {
CpuLayout cpuLayout = AffinityLock.cpuLayout();
return cpuLayout.socketId(cpuId) == cpuLayout.socketId(cpuId2)
&& cpuLayout.coreId(cpuId) != cpuLayout.coreId(cpuId2);
}
}
```