Skip to content

setAffinity does not work as expected in Windows #117

@kopavel

Description

@kopavel

On win 11 got warning:
"Tried to set affinity to {7} but was {0,1,2,3,4,5,6,7} you may have insufficient access rights"
and nohing heppend - thread remain affined to all cores.

Java version: jdk-21.0.2.13-hotspot (Eclipse Adoptium)
jna and jna-platform verstion: 5.14.0
affinity version: 3.23.3

Thread, for which i try to lock affiniti created by :

Thread.ofPlatform().name("AffinedThread").start(() -> {
try (AffinityLock al = AffinityLock.acquireLock()) {
.....
}
});

Starting console in which java started with Admin rights change nothing.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions