Skip to content

Commit acdd01c

Browse files
committed
Modify warning logic in WindowsJNAAffinity.setAffinity
1 parent 389545d commit acdd01c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

affinity/src/main/java/net/openhft/affinity/impl/WindowsJNAAffinity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void setAffinity(final BitSet affinity) {
8989
throw new IllegalStateException("SetThreadAffinityMask((" + pid + ") , &(" + affinity + ") ) errorNo=" + e.getErrorCode(), e);
9090
}
9191
BitSet affinity2 = getAffinity0();
92-
if (!affinity2.equals(affinity)) {
92+
if (!affinity2.intersects(affinity)) {
9393
LoggerFactory.getLogger(WindowsJNAAffinity.class).warn("Tried to set affinity to " + affinity + " but was " + affinity2 + " you may have insufficient access rights");
9494
}
9595
currentAffinity.set((BitSet) affinity.clone());

0 commit comments

Comments
 (0)