Skip to content

Do we need a mutex in FieldMap ? #677

Open
@sylr

Description

@sylr

In #485 a mutex has been added to FieldMap to make it Thread Safe.

However, in the same PR, the Message pool mechanism has also been removed so Messages are not re-used any longer and it's up to the Go garbage collector to free unused messages.

In that context I fail to see a scenario where a Message and the underlying FieldMaps need to be thread safe.

Can someone share a use case where a message is concurrently read/updated ?

cc @waheedoo @ackleymi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions