]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Corrected lifetime of clusters from Integer.MAX_VALUE to Long.MAX_VALUE 55/1255/1
authorJussi Koskela <jussi.koskela@semantum.fi>
Thu, 23 Nov 2017 09:23:43 +0000 (11:23 +0200)
committerJussi Koskela <jussi.koskela@semantum.fi>
Thu, 23 Nov 2017 09:23:43 +0000 (11:23 +0200)
refs #7637

Change-Id: Ia26059c496fae22538e7c398924c9294d638d248

bundles/org.simantics.acorn/src/org/simantics/acorn/MainProgram.java

index ecc9649f3b550054d0cd60220ad74a016c2d4337..b5ba2471b486b10ce91f169c2797cc0673ddc276 100644 (file)
@@ -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() {