#20569 added a change to turn hangs in Dictionary (caused by illegal concurrent access) into crashes, which are more useful.
It looks we missing the same protection in the 2 Remove() overloads. It contains code like
while (i >= 0)
{
ref Entry entry = ref entries[i];
...
i = entry.next;
}
The hangs we have seen were all loops in the entries chain - such a loop could cause the above code to hang also so we should probably apply the same change to this.
#20569 added a change to turn hangs in Dictionary (caused by illegal concurrent access) into crashes, which are more useful.
It looks we missing the same protection in the 2 Remove() overloads. It contains code like
The hangs we have seen were all loops in the entries chain - such a loop could cause the above code to hang also so we should probably apply the same change to this.