You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sync.Map was useful enough to be promoted from /x/, but was made before generics and utilizes interface{} (now any)
Proposal
Re-implement the existing API of sync.Map using generics for added type safety/convenience. Use alternate struct name to maintain backward compatibility (e.g. sync.MapGeneric)
Release
Release to /x/sync first while feedback is submitted.
Additional considerations
Proposal #47643 requested support for additional algorithms for additional use cases. We may want to allow the sync.Map's implementation algorithm to be user selectable. If so, I'd propose adding a method that can optionally be invoked on newly created sync.MapGeneric structs to specify the backing algorithm.
Separately
I volunteer to do the work.
The text was updated successfully, but these errors were encountered:
Background
sync.Map was useful enough to be promoted from /x/, but was made before generics and utilizes
interface{}
(nowany
)Proposal
Re-implement the existing API of sync.Map using generics for added type safety/convenience. Use alternate struct name to maintain backward compatibility (e.g.
sync.MapGeneric
)Release
Release to /x/sync first while feedback is submitted.
Additional considerations
Proposal #47643 requested support for additional algorithms for additional use cases. We may want to allow the sync.Map's implementation algorithm to be user selectable. If so, I'd propose adding a method that can optionally be invoked on newly created sync.MapGeneric structs to specify the backing algorithm.
Separately
I volunteer to do the work.
The text was updated successfully, but these errors were encountered: