Skip to content

Commit b30167a

Browse files
committed
Improve tuning and shutdown of tests in services, ChronicleEnterprise/Chronicle-Services-Enterprise#172
1 parent d4455d0 commit b30167a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

affinity/src/main/java/net/openhft/affinity/AffinityLock.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@ public AffinityLock acquireLock(AffinityStrategy... strategies) {
353353
* Release the current AffinityLock which can be discarded.
354354
*/
355355
public void release() {
356+
if (cpuId == ANY_CPU || !reservable)
357+
return;
358+
// expensive if not actually used.
356359
lockInventory.release();
357360
}
358361

0 commit comments

Comments
 (0)