pingcap/tidb
Vedi su GitHubProposal to use atomic.Pointer[T] instead of atomic.Value
Open
#44.736 aperta il 16 giu 2023
good first issuetype/enhancement
Metriche repository
- Star
- (40.090 star)
- Metriche merge PR
- (Merge medio 14g 4h) (346 PR mergiate in 30 g)
Descrizione
Enhancement
Currently, the usage of atomic.Value is prevalent in our codebase. However, I would like to propose using atomic.Pointer[T] instead. The reason being that atomic.Pointer[T] provides a clearer expression of the type, which can help in reducing type conversions.
Therefore, I suggest that we consider using atomic.Pointer[T] in our codebase wherever possible. This change will not only result in better code clarity but also improve the performance of our code.