Skip to content

Add callback when retrieving value especially for pointer value #161

@rucciva

Description

@rucciva

Storing pointer value means that after Get(), the value inside map have more than one pointers. This could lead to mistake that trigger data race, for example when upsert is implemented by updating the value inside the map instead of replacing it.

Suggestion: add RetrieveCB()--similar to upsert and remove--which receive callback that can be used to deep clone the pointed value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions