Update MHTClickTrainAlgorithm.java

Synchronize calls into MHT Algorithm across threads (can mess up during restarts otherwise)
This commit is contained in:
Douglas Gillespie 2024-02-22 17:40:45 +00:00
parent e491028ef7
commit 156952bafe

View File

@ -420,7 +420,7 @@ public class MHTClickTrainAlgorithm implements ClickTrainAlgorithm, PamSettings
* Update the algorithm * Update the algorithm
* @param flag- flag indicating the update type. * @param flag- flag indicating the update type.
*/ */
public void update(int flag, Object info) { public synchronized void update(int flag, Object info) {
if (Thread.currentThread() != previousThread) { if (Thread.currentThread() != previousThread) {
// see flag id constants in ClickTrianControl // see flag id constants in ClickTrianControl