This is an automated email from the ASF dual-hosted git repository.

sergeykamov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/master by this push:
     new a0d8875  Minor fixes.
a0d8875 is described below

commit a0d8875612de3ee1190c397de010eb2a2c8d968d
Author: Sergey Kamov <sergeyka...@apache.org>
AuthorDate: Wed Mar 25 22:54:48 2020 +0300

    Minor fixes.
---
 .../nlpcraft/server/probe/NCProbeManager.scala       | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git 
a/src/main/scala/org/apache/nlpcraft/server/probe/NCProbeManager.scala 
b/src/main/scala/org/apache/nlpcraft/server/probe/NCProbeManager.scala
index 155f6ea..5dfd2e8 100644
--- a/src/main/scala/org/apache/nlpcraft/server/probe/NCProbeManager.scala
+++ b/src/main/scala/org/apache/nlpcraft/server/probe/NCProbeManager.scala
@@ -124,19 +124,19 @@ object NCProbeManager extends NCService {
                 dnSocket.close()
         }
     }
-    
-    private var dnSrv: Thread = _
-    private var upSrv: Thread = _
-    private var pingSrv: Thread = _
+
+    @volatile private var dnSrv: Thread = _
+    @volatile private var upSrv: Thread = _
+    @volatile private var pingSrv: Thread = _
     
     // All known probes keyed by probe key.
-    private var probes: mutable.Map[ProbeKey, ProbeHolder] = _
-    private var mdls: mutable.Map[String, NCProbeModelMdo] = _
+    @volatile private var probes: mutable.Map[ProbeKey, ProbeHolder] = _
+    @volatile private var mdls: mutable.Map[String, NCProbeModelMdo] = _
     // All probes pending complete handshake keyed by probe key.
-    private var pending: mutable.Map[ProbeKey, ProbeHolder] = _
-    
-    private var pool: ExecutorService = _
-    private var isStopping: AtomicBoolean = _
+    @volatile private var pending: mutable.Map[ProbeKey, ProbeHolder] = _
+
+    @volatile private var pool: ExecutorService = _
+    @volatile private var isStopping: AtomicBoolean = _
     
     /**
       *

Reply via email to