Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify warning logic in WindowsJNAAffinity.setAffinity #118

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

yevgenp
Copy link
Contributor

@yevgenp yevgenp commented Apr 9, 2024

Closes #117

Copy link
Contributor

@tgd tgd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @yevgenp thanks for sorting this out 👍

Please can you get the Windows build green before merging - I believe it has been broken for a while but this is a good opportunity to fix it.

@yevgenp yevgenp changed the title Replace WindowsJNAAffinity.SetThreadAffinityMask with SetProcessAffinityMask. Modify warning logic in WindowsJNAAffinity.setAffinity Apr 10, 2024
@@ -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)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to cover this with a Windows specific unit test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That warning is being produced on every Windows test (except when run on a single CPU). IMO it would not yield too much value to test a single log line. Especially, when we can't reproduce a negative case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants