-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
dotnet/dotnet-api-docs
#568Closed
Copy link
Labels
Description
I expect the concurrentDictionary to be thread safe for all of its write operation. The documentation of the GetOrAdd method doesn't specify that it is not thread safe which is a problem. I really think that there should be a GetOrAdd overload with a bool specifying that we want thread safety. I also think that the current GetOrAdd should be renamed GetOrAddUnsafe to make it clear that it doesn't respect the expected behavior of the class
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 806c6485-9396-e6bf-2f8e-f27866115626
- Version Independent ID: 3e499bf3-fa82-0b82-5d85-84a0b3fe0515
- Content: ConcurrentDictionary<TKey,TValue> Class (System.Collections.Concurrent)
- Content Source: [xml/System.Collections.Concurrent/ConcurrentDictionary
2.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Collections.Concurrent/ConcurrentDictionary2.xml) - Product: dotnet-api
- GitHub Login: @mairaw
- Microsoft Alias: mairaw
CwjXFH