Skip to content

Commit

Permalink
Modify warning logic in WindowsJNAAffinity.setAffinity
Browse files Browse the repository at this point in the history
  • Loading branch information
yevgenp committed Apr 10, 2024
1 parent 389545d commit acdd01c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void setAffinity(final BitSet affinity) {
throw new IllegalStateException("SetThreadAffinityMask((" + pid + ") , &(" + affinity + ") ) errorNo=" + e.getErrorCode(), e);
}
BitSet affinity2 = getAffinity0();
if (!affinity2.equals(affinity)) {
if (!affinity2.intersects(affinity)) {
LoggerFactory.getLogger(WindowsJNAAffinity.class).warn("Tried to set affinity to " + affinity + " but was " + affinity2 + " you may have insufficient access rights");
}
currentAffinity.set((BitSet) affinity.clone());
Expand Down

0 comments on commit acdd01c

Please sign in to comment.