From d2682c13178d3374794aab7637a4de371e9bef00 Mon Sep 17 00:00:00 2001 From: Jussi Koskela Date: Thu, 23 Nov 2017 11:23:43 +0200 Subject: [PATCH] Corrected lifetime of clusters from Integer.MAX_VALUE to Long.MAX_VALUE refs #7637 Change-Id: Ia26059c496fae22538e7c398924c9294d638d248 --- .../src/org/simantics/acorn/MainProgram.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bundles/org.simantics.acorn/src/org/simantics/acorn/MainProgram.java b/bundles/org.simantics.acorn/src/org/simantics/acorn/MainProgram.java index ecc9649f3..b5ba2471b 100644 --- a/bundles/org.simantics.acorn/src/org/simantics/acorn/MainProgram.java +++ b/bundles/org.simantics.acorn/src/org/simantics/acorn/MainProgram.java @@ -300,19 +300,13 @@ public class MainProgram implements Runnable, Closeable { private void swapChunks() throws AcornAccessVerificationException, IllegalAcornStateException { // Cache chunks during update operations - boolean written = clusters.streamLRU.swap(Integer.MAX_VALUE, CHUNK_CACHE_SIZE); - while(written) { - written = clusters.streamLRU.swap(Integer.MAX_VALUE, CHUNK_CACHE_SIZE); - } + while(clusters.streamLRU.swap(Long.MAX_VALUE, CHUNK_CACHE_SIZE)); } private void swapCS() throws AcornAccessVerificationException, IllegalAcornStateException { // Cache chunks during update operations - boolean written = clusters.csLRU.swap(Integer.MAX_VALUE, CHUNK_CACHE_SIZE); - while(written) { - written = clusters.csLRU.swap(Integer.MAX_VALUE, CHUNK_CACHE_SIZE); - } + while(clusters.csLRU.swap(Long.MAX_VALUE, CHUNK_CACHE_SIZE)); } public synchronized void committed() { -- 2.47.1