dfiai commented on issue #3167:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/issues/3167#issuecomment-1941310835

   @ricardozanini, @fjtirado what are your thoughts on this(but it still won't 
work with several pods):
   
   ```java
   import java.util.concurrent.ConcurrentHashMap;
   import java.util.concurrent.atomic.AtomicInteger;
   
   private ConcurrentHashMap<Long, AtomicInteger> triggers = new 
ConcurrentHashMap<>();
   ...
   case Join.TYPE_AND:
       // Use computeIfAbsent to handle the initialization and increment 
atomically
       triggers.computeIfAbsent(from.getNodeId(), k -> new 
AtomicInteger(0)).incrementAndGet();
   
       if (checkAllActivated()) {
           decreaseAllTriggers();
           triggerCompleted();
       }
       break;
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to