Skip to content

Document behaviour of ConcurrentDictionary AddOrUpdate when factory funcs throw #12771

Description

@paulmedynski

Type of issue

Missing information

Description

The ConcurrentDictionary AddOrUpdate() docs don't explain what happens if the factory funcs throw. The implementation appears to abort the action and leave the dictionary unchagned. Is this behaviour guaranteed?

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentdictionary-2.addorupdate?view=net-10.0

Content source URL

https://github.com/dotnet/dotnet-api-docs-temp/blob/live/xml/System.Collections.Concurrent/ConcurrentDictionary`2.xml

Document Version Independent Id

125a4bf6-81d6-6239-c403-274b4ced126f

Platform Id

5191d709-dd5b-3d43-cae2-6d630ddcf75e

Article author

@dotnet-bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions