KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following ConcurrentDictionary : ConcurrentDictionary<Guid, Session> sessions; I know that sessions.TryGetValue(key, out session) is thread-safe, but my question is if sessions[key] is also thread-safe? sessions.TryGetValue(key, out session) returns true or false depending on whether it was able to get the value or not. Will sessions[key] return null if it is unable to get the value? I would think so. Can anyone confirm or shed more light on this? Thanks.
Tags (comma-separated)
Save Edits
Cancel