Multi Threaded update to List of TriggeredAbilities - Why and how to avoid? #966
Labels
Comments
|
I did a lot of tests without ConcurrentHashMap and I didn't get any errors. I guess that there might be some cases were the TriggeredAbilities list is modified while it is being traversed. This could throw a ConcurrentModificationException. I think it should be fine to change it back to ConcurrentHashMap. The performance saving is not that great. |
|
I assume there are triggered abilities that add triggered abilites that cause this problem. So probably the update won't be caused by another thread. But I'm not sure because the ability will only be put onto the stack on not resolve yet. Chnaged it back to ConcurrentHashMap. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BetaSteward reverted the list of triggeredabilities recently back to HashMap from ConcurrentHashMap with this commit: fcb9bc9.
Now again the ConcurrentModificationExceptions happen on servers.
http://www.slightlymagic.net/forum/viewtopic.php?f=70&t=17186&p=178870#p178870
http://www.slightlymagic.net/forum/viewtopic.php?f=70&t=17186&start=30#p179083
First issue was #473.
Checking for the reason is needed and resolving the issue in one or the other way.
The text was updated successfully, but these errors were encountered: