Registry / utility / affinity

affinity

JSON →
library3.23.3javamavenunverified

A library to set thread affinity for Java applications, improving performance on multi-core systems.

<dependency> <groupId>net.openhft</groupId> <artifactId>affinity</artifactId> <version>3.23.3</version> </dependency>
INSTALL
IMPORT
SIG · AFFINITY
A
affinity
utilityjavav3.23.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AffinityLock
net.openhft.affinity.AffinityLock

Acquire an AffinityLock to bind the current thread to a CPU.

import net.openhft.affinity.AffinityLock; public class Example { public static void main(String[] args) { try (AffinityLock lock = AffinityLock.acquireLock()) { System.out.println("Thread bound to CPU: " + lock.cpuId()); } } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
3.23.3latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
26
OpenAI (training)
1
Resources
affinity — mvn dependency:get affinity · libregistry