Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

OrderedMap.ForEach is not "really" thread safe #2615

@hmoog

Description

@hmoog

Bug description

OrderedMap.ForEach can result in a situation, where the iteration order is somewhat undefined while we are iterating if the elements get mutated during the iteration

Expected behaviour

Calling ForEach should give us the elements that are in the map by the time ForEach is called (make a copy).

Actual behaviour

Calling ForEach locks only each iterated entry, which means that if the order changes in between, we might miss or skip some entries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions