Skip to content

3.0.4 Release

Choose a tag to compare

@milkshakeuk milkshakeuk released this 11 Aug 13:13
· 429 commits to master since this release

This change is to prevent the following Exception:

System.ArgumentException - An item with the same key has already been added.

In cases where dictionaries / hashtables are used for lookups such as Escape.cs when there multiple threads trying to add to them at the same time.

Instead of using Add(key, value) which only allows 1 items with a given key to be added to the dictionary / hashtable, we are using the index accessor to set or update the value in a last one wins scenario, but only when its combined with ContainsKey which has indicated that an item with that key shouldn't exist.

By @milkshakeuk