From 782dfcb9fc5ce3db46598f660abf642b9c8849b7 Mon Sep 17 00:00:00 2001 From: Jussi Koskela Date: Fri, 20 Oct 2017 09:11:13 +0300 Subject: [PATCH] Declare asyncCount volatile since it is accessed from multiple threads refs #7565 Change-Id: Ibea9155356882beb74e330ec8ed8b03bee3cbb15 --- .../src/fi/vtt/simantics/procore/internal/State.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java index 5adc59300..f30418a6a 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java @@ -47,7 +47,7 @@ class State { private volatile int readCount = 0; // Must be volatile so we don't have to synchronize getReadCount. private volatile int writeCount = 0; // Must be volatile so we don't have to synchronize getWriteCount. private Thread writeOwner = null; - private int asyncCount = 1; + private volatile int asyncCount = 1; // Must be volatile so we don't have to synchronize getAsyncCount. private TransactionToken transactionToken = null; void setCombine(boolean a) { if (null != transactionToken) -- 2.47.1