Use ConcurrentDictionary instead of Dictionary.