c# - Duplicate keys in Dictionary<string,EventHandler> -
i have
public static readonly dictionary<string, eventhandler> cachehandlers = new dictionary<string, eventhandler>();
and have duplicate keys in dictionary:
debugger screenshot: http://i.stack.imgur.com/tuxi7.png
how happen?
is bug in .net framework or artifact of concurent usage?
msdn states dictionarys might not thread safe.
if concurrently reading dictionary, might safe long lock dictionary when add new key/value pairs.
Comments
Post a Comment