-
Bug
-
Resolution: Done
-
Major
-
6.3.0.Final
-
None
-
-
NEW
-
NEW
While initializing facts for the first time the following method in ReteWorkingMemory is invoked:
private final Integer syncLock = 42; public void initInitialFact() { if ( initialFactHandle == null ) { synchronized ( syncLock ) { if ( initialFactHandle == null ) { // double check, inside of sync point incase some other thread beat us to it. initInitialFact(kBase, null); } } } }
Since the synchronized lock is taken on a Integer constant variable, the same object gets used across different threads. This causes the initialization of all the ReteMemoryObjects to wait in the initInitialFact() method across different threads.
The lock should be taken on Object lock = new Object() instead