refactor: modernize sync/atomic usage with typed atomic apis
Modernize sync/atomic usage with typed atomic APIs
Replace legacy sync/atomic function-based API (AddInt32, LoadInt32, etc.) with Go 1.19+ typed atomic types (atomic.Int32, atomic.Int64, etc.).
This change:
- Improves code readability by removing explicit address-of operators
- Enhances type safety at compile-time
- Provides better API ergonomics with method-based access
- Aligns with modern Go best practices (More info https://github.com/golang/go/issues/50860)
The transformation is source-compatible and requires Go 1.19 or later.
@JoeGruffins @buck54321 Hi, Could you please review this PR at your convenience? Thank you very much.
@JoeGruffins @buck54321 Hi, Could you please review this PR at your convenience? Thank you very much.
I made the same observation, but I saw that it has already been submitted. Good fixes.
@JoeGruffins @buck54321 friendly ping~