From 1825fc61ee53d7f84ddb49c3799d5e9e2ae8c503 Mon Sep 17 00:00:00 2001 From: leventov Date: Sat, 1 Oct 2016 22:06:14 +0300 Subject: [PATCH] More correctly formulated reasoning of loadFence() in ThreadLocalState.unlockContextLocally() --- .../chronicle/hash/impl/stage/hash/ThreadLocalState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/openhft/chronicle/hash/impl/stage/hash/ThreadLocalState.java b/src/main/java/net/openhft/chronicle/hash/impl/stage/hash/ThreadLocalState.java index 6936c3eee..cb37cfa2f 100644 --- a/src/main/java/net/openhft/chronicle/hash/impl/stage/hash/ThreadLocalState.java +++ b/src/main/java/net/openhft/chronicle/hash/impl/stage/hash/ThreadLocalState.java @@ -75,7 +75,7 @@ public abstract class ThreadLocalState { public void unlockContextLocally() { // Ensure all reads from mapped memory are done before thread calling chronicleMap.close() - // frees resources potentially nulling some pointer used in those reads. + // frees resources potentially unmapping some memory from where those reads are performed. MEMORY.loadFence(); // Avoid volatile write to avoid expensive store-load barrier MEMORY.writeOrderedInt(this, CONTEXT_LOCK_OFFSET, CONTEXT_UNLOCKED);