TriggerReactor

TriggerReactor

24.6k Downloads

Some consideration is needed when two async NamedTrigger accessing local vars at the same time

wysohn opened this issue ยท 1 comments

commented

Currently, the local variable is HashMap, so ConcurrentModificationException will throw in that case.

Perhaps this: https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedMap(java.util.Map)

commented

@wysohn
2 named triggers accessing vars at the same time is likely to cause unpredictable behavior anyway. I suggest that instead, when the named trigger is called, that we copy the map, and only change the caller's variables once the named trigger returns.