go-zero
go-zero copied to clipboard
AtomicXXX type consideration
Currently, syncx package defines atomic types like following:
type AtomicBool uint32
type AtomicDuration int64
type AtomicFloat64 uint64
In this way, we cannot prohibit developers from using them as non-atomic types. Isn't it better to define it like this?
type AtomicBool struct {
state uint32
}
I think it's a good idea.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.